compute_objective_val: Computes Objective Value From Allocation Vector

View source: R/shared.R

compute_objective_valR Documentation

Computes Objective Value From Allocation Vector

Description

Returns the objective value given a design vector as well an an objective function. This is sometimes duplicated in Java. However, within Java, tricks are played to make optimization go faster so Java's objective values may not always be the same as the true objective function (e.g. logs or constants dropped).

Usage

compute_objective_val(X, indic_T, objective = "abs_sum_diff", inv_cov_X = NULL)

Arguments

X

The n x p design matrix

indic_T

The n-length binary allocation vector

objective

The objective function to use. Default is abs_sum_diff and the other option is mahal_dist.

inv_cov_X

Optional: the inverse sample variance covariance matrix. Use this argument if you will be doing many calculations since passing this in will cache this data.

Author(s)

Adam Kapelner


GreedyExperimentalDesign documentation built on July 26, 2023, 5:48 p.m.