fitnessCPP: Fitness Function in C++

Description Usage Arguments

View source: R/RcppExports.R

Description

A generated action vector and state matrix are input and this function returns a numeric vector of the same length as the outcome. evolve_model then computes a fitness score for that potential solution FSM by comparing it to the provided outcome. This is repeated for every FSM in the population and then the probability of selection for the next generation is set to be proportional to the fitness scores. This function is also used in the predict method for the resulting final model that is returned. The function aborts if the user aborts in R, checking every 1000 iterations.

Usage

1
fitnessCPP(action_vec, state_mat, covariates, period)

Arguments

action_vec

Integer Vector.

state_mat

Integer Matrix.

covariates

Integer Matrix.

period

Integer Vector.


JohnNay/datafsm documentation built on June 9, 2021, 10:32 p.m.