void pred_rls_free(const struct XCSF *xcsf, const struct Cl *c)
Frees the memory used by an RLS prediction.
void pred_rls_copy(const struct XCSF *xcsf, struct Cl *dest, const struct Cl *src)
Copies an RLS prediction from one classifier to another.
void pred_rls_update(const struct XCSF *xcsf, const struct Cl *c, const double *x, const double *y)
Updates an RLS prediction for a given input and truth sample.
double pred_rls_size(const struct XCSF *xcsf, const struct Cl *c)
Returns the size of an RLS prediction.
static struct PredVtbl const pred_rls_vtbl
Recursive least mean squares prediction implemented functions.
void pred_rls_init(const struct XCSF *xcsf, struct Cl *c)
Initialises an RLS prediction.
char * pred_rls_json_export(const struct XCSF *xcsf, const struct Cl *c)
Returns a json formatted string representation of an RLS prediction.
size_t pred_rls_load(const struct XCSF *xcsf, struct Cl *c, FILE *fp)
Reads an RLS prediction from a file.
void pred_rls_print(const struct XCSF *xcsf, const struct Cl *c)
Prints an RLS prediction.
char * pred_rls_param_json_export(const struct XCSF *xcsf)
Returns a json formatted string of the RLS parameters.
void pred_rls_json_import(const struct XCSF *xcsf, struct Cl *c, const cJSON *json)
Creates an RLS prediction from a cJSON object.
bool pred_rls_crossover(const struct XCSF *xcsf, const struct Cl *c1, const struct Cl *c2)
Dummy function since RLS predictions do not perform crossover.
char * pred_rls_param_json_import(struct XCSF *xcsf, cJSON *json)
Sets the RLS parameters from a cJSON object.
void pred_rls_compute(const struct XCSF *xcsf, const struct Cl *c, const double *x)
Computes the current RLS prediction for a provided input.
bool pred_rls_mutate(const struct XCSF *xcsf, const struct Cl *c)
Dummy function since RLS predictions do not perform mutation.
size_t pred_rls_save(const struct XCSF *xcsf, const struct Cl *c, FILE *fp)
Writes an RLS prediction to a file.
Interface for classifier predictions.
Classifier data structure.
Recursive least mean squares prediction data structure.
double * tmp_vec
Temporary storage for updating weights.
double * tmp_input
Temporary storage for updating weights.
double * matrix
Gain matrix used to update weights.
int n
Number of weights for each predicted variable.
double * weights
Weights used to compute prediction.
int n_weights
Total number of weights.
double * tmp_matrix2
Temporary storage for updating gain matrix.
double * tmp_matrix1
Temporary storage for updating gain matrix.
Prediction interface data structure.