|
XCSF 1.4.8
XCSF learning classifier system
|
Piece-wise constant prediction functions. More...
Go to the source code of this file.
Functions | |
| bool | pred_constant_crossover (const struct XCSF *xcsf, const struct Cl *c1, const struct Cl *c2) |
| Dummy function since constant predictions do not perform crossover. | |
| bool | pred_constant_mutate (const struct XCSF *xcsf, const struct Cl *c) |
| Dummy function since constant predictions do not perform mutation. | |
| double | pred_constant_size (const struct XCSF *xcsf, const struct Cl *c) |
| Returns the size of a constant prediction. | |
| size_t | pred_constant_load (const struct XCSF *xcsf, struct Cl *c, FILE *fp) |
| Dummy function since constant predictions have no data structure. | |
| size_t | pred_constant_save (const struct XCSF *xcsf, const struct Cl *c, FILE *fp) |
| Dummy function since constant predictions have no data structure. | |
| void | pred_constant_compute (const struct XCSF *xcsf, const struct Cl *c, const double *x) |
| Dummy function since constant predictions are not computed. | |
| void | pred_constant_copy (const struct XCSF *xcsf, struct Cl *dest, const struct Cl *src) |
| Dummy function since constant predictions have no data structure. | |
| void | pred_constant_free (const struct XCSF *xcsf, const struct Cl *c) |
| Dummy function since constant predictions have no data structure. | |
| void | pred_constant_init (const struct XCSF *xcsf, struct Cl *c) |
| Dummy function since constant predictions have no data structure. | |
| void | pred_constant_print (const struct XCSF *xcsf, const struct Cl *c) |
| Prints a constant prediction. | |
| void | pred_constant_update (const struct XCSF *xcsf, const struct Cl *c, const double *x, const double *y) |
| Updates a constant prediction for a given input and truth sample. | |
| char * | pred_constant_json_export (const struct XCSF *xcsf, const struct Cl *c) |
| Returns a json formatted string representation of a prediction. | |
| void | pred_constant_json_import (const struct XCSF *xcsf, struct Cl *c, const cJSON *json) |
| Creates a constant prediction from a cJSON object. | |
Variables | |
| static struct PredVtbl const | pred_constant_vtbl |
| Constant prediction implemented functions. | |
Piece-wise constant prediction functions.
Definition in file pred_constant.h.
Dummy function since constant predictions are not computed.
| [in] | xcsf | The XCSF data structure. |
| [in] | c | The classifier calculating the prediction. |
| [in] | x | The input state. |
Definition at line 97 of file pred_constant.c.
Dummy function since constant predictions have no data structure.
| [in] | xcsf | The XCSF data structure. |
| [in] | dest | The destination classifier. |
| [in] | src | The source classifier. |
Definition at line 46 of file pred_constant.c.
| bool pred_constant_crossover | ( | const struct XCSF * | xcsf, |
| const struct Cl * | c1, | ||
| const struct Cl * | c2 | ||
| ) |
Dummy function since constant predictions do not perform crossover.
| [in] | xcsf | The XCSF data structure. |
| [in] | c1 | The first classifier whose prediction is being crossed. |
| [in] | c2 | The second classifier whose prediction is being crossed. |
Definition at line 126 of file pred_constant.c.
Dummy function since constant predictions have no data structure.
| [in] | xcsf | The XCSF data structure. |
| [in] | c | The classifier whose prediction is to be freed. |
Definition at line 60 of file pred_constant.c.
Dummy function since constant predictions have no data structure.
| [in] | xcsf | The XCSF data structure. |
| [in] | c | The classifier whose prediction is to be initialised. |
Definition at line 33 of file pred_constant.c.
Returns a json formatted string representation of a prediction.
| [in] | xcsf | XCSF data structure. |
| [in] | c | Classifier whose prediction is to be returned. |
Definition at line 201 of file pred_constant.c.
References Cl::prediction.
Referenced by pred_constant_print().
Creates a constant prediction from a cJSON object.
| [in] | xcsf | The XCSF data structure. |
| [in,out] | c | The classifier to initialise. |
| [in] | json | cJSON object. |
Definition at line 219 of file pred_constant.c.
References Cl::prediction.
Dummy function since constant predictions have no data structure.
| [in] | xcsf | The XCSF data structure. |
| [in] | c | The classifier whose prediction is to be read. |
| [in] | fp | Pointer to the file to be read. |
Definition at line 186 of file pred_constant.c.
Dummy function since constant predictions do not perform mutation.
| [in] | xcsf | The XCSF data structure. |
| [in] | c | The classifier whose prediction is being mutated. |
Definition at line 142 of file pred_constant.c.
Prints a constant prediction.
| [in] | xcsf | The XCSF data structure. |
| [in] | c | The classifier whose prediction is to be printed. |
Definition at line 111 of file pred_constant.c.
References pred_constant_json_export().
Dummy function since constant predictions have no data structure.
| [in] | xcsf | The XCSF data structure. |
| [in] | c | The classifier whose prediction is to be written. |
| [in] | fp | Pointer to the file to be written. |
Definition at line 170 of file pred_constant.c.
Returns the size of a constant prediction.
| [in] | xcsf | The XCSF data structure. |
| [in] | c | The classifier whose prediction size to return. |
Definition at line 156 of file pred_constant.c.
| void pred_constant_update | ( | const struct XCSF * | xcsf, |
| const struct Cl * | c, | ||
| const double * | x, | ||
| const double * | y | ||
| ) |
Updates a constant prediction for a given input and truth sample.
| [in] | xcsf | The XCSF data structure. |
| [in] | c | Classifier whose prediction is to be updated. |
| [in] | x | Input state. |
| [in] | y | Truth/payoff value. |
Definition at line 74 of file pred_constant.c.
References Cl::exp, and Cl::prediction.
|
static |
Constant prediction implemented functions.
Definition at line 76 of file pred_constant.h.
Referenced by prediction_set().