.Fitness_cpp {LorenzRegression} | R Documentation |
Computes the fitness used in the GA
Description
Computes the fitness of a candidate in the genetic algorithm displayed in function Lorenz.GA.cpp
Usage
.Fitness_cpp(x, Y, X, Z, pi)
Arguments
x |
vector of size (p-1) giving the proposed candidate, where p is the number of covariates |
Y |
vector of size n gathering the response, where n is the sample size |
X |
matrix of dimension (n*p) gathering the covariates |
Z |
vector of size n gathering iid repetitions of a U[0,1] |
pi |
vector of size n gathering the observation weights (notice that sum(pi)=1) |
Value
Fitness of candidate x
[Package LorenzRegression version 1.0.0 Index]