void pred_nlms_json_import(const struct XCSF *xcsf, struct Cl *c, const cJSON *json)
Creates an NLMS prediction from a cJSON object.
char * pred_nlms_param_json_export(const struct XCSF *xcsf)
Returns a json formatted string of the NLMS parameters.
void pred_nlms_compute(const struct XCSF *xcsf, const struct Cl *c, const double *x)
Computes the current NLMS prediction for a provided input.
char * pred_nlms_json_export(const struct XCSF *xcsf, const struct Cl *c)
Returns a json formatted string representation of an NLMS prediction.
size_t pred_nlms_save(const struct XCSF *xcsf, const struct Cl *c, FILE *fp)
Writes an NLMS prediction to a file.
bool pred_nlms_crossover(const struct XCSF *xcsf, const struct Cl *c1, const struct Cl *c2)
Dummy function since NLMS predictions do not perform crossover.
void pred_nlms_print(const struct XCSF *xcsf, const struct Cl *c)
Prints an NLMS prediction.
void pred_nlms_init(const struct XCSF *xcsf, struct Cl *c)
Initialises an NLMS prediction.
static struct PredVtbl const pred_nlms_vtbl
Normalised least mean squares prediction implemented functions.
void pred_nlms_free(const struct XCSF *xcsf, const struct Cl *c)
Frees the memory used by an NLMS prediction.
bool pred_nlms_mutate(const struct XCSF *xcsf, const struct Cl *c)
Mutates the gradient descent rate used to update an NLMS prediction.
double pred_nlms_size(const struct XCSF *xcsf, const struct Cl *c)
Returns the size of an NLMS prediction.
void pred_nlms_update(const struct XCSF *xcsf, const struct Cl *c, const double *x, const double *y)
Updates an NLMS prediction for a given input and truth sample.
char * pred_nlms_param_json_import(struct XCSF *xcsf, cJSON *json)
Sets the NLMS parameters from a cJSON object.
void pred_nlms_copy(const struct XCSF *xcsf, struct Cl *dest, const struct Cl *src)
Copies an NLMS prediction from one classifier to another.
size_t pred_nlms_load(const struct XCSF *xcsf, struct Cl *c, FILE *fp)
Reads an NLMS prediction from a file.
Interface for classifier predictions.
Classifier data structure.
Normalised least mean squares prediction data structure.
double * mu
Mutation rates.
int n_weights
Total number of weights.
double * tmp_input
Temporary storage for updating weights.
int n
Number of weights for each predicted variable.
double eta
Gradient descent rate.
double * weights
Weights used to compute prediction.
Prediction interface data structure.