|
XCSF 1.4.8
XCSF learning classifier system
|
Supervised regression learning functions. More...
#include "xcsf.h"Go to the source code of this file.
Functions | |
| double | xcs_supervised_fit (struct XCSF *xcsf, const struct Input *train_data, const struct Input *test_data, const bool shuffle, const int start, const int trials) |
| Executes MAX_TRIALS number of XCSF learning iterations using the training data and test iterations using the test data. | |
| double | xcs_supervised_score (struct XCSF *xcsf, const struct Input *data, const double *cover) |
| Calculates the XCSF error for the input data. | |
| double | xcs_supervised_score_n (struct XCSF *xcsf, const struct Input *data, const int N, const double *cover) |
| Calculates the XCSF error for a subsample of the input data. | |
| void | xcs_supervised_predict (struct XCSF *xcsf, const double *x, double *pred, const int n_samples, const double *cover) |
| Calculates the XCSF predictions for the provided input. | |
Supervised regression learning functions.
Definition in file xcs_supervised.h.
| double xcs_supervised_fit | ( | struct XCSF * | xcsf, |
| const struct Input * | train_data, | ||
| const struct Input * | test_data, | ||
| const bool | shuffle, | ||
| const int | start, | ||
| const int | trials | ||
| ) |
Executes MAX_TRIALS number of XCSF learning iterations using the training data and test iterations using the test data.
| [in] | xcsf | The XCSF data structure. |
| [in] | train_data | The input data to use for training. |
| [in] | test_data | The input data to use for testing. |
| [in] | shuffle | Whether to randomise the instances during training. |
| [in] | start | Index to begin sampling. |
| [in] | trials | Number of trials to execute. |
Definition at line 99 of file xcs_supervised.c.
References param_set_explore(), perf_print(), Input::x, Input::x_dim, xcs_supervised_sample(), xcs_supervised_trial(), Input::y, and Input::y_dim.
Referenced by XCS::fit(), and main().
| void xcs_supervised_predict | ( | struct XCSF * | xcsf, |
| const double * | x, | ||
| double * | pred, | ||
| const int | n_samples, | ||
| const double * | cover | ||
| ) |
Calculates the XCSF predictions for the provided input.
| [in] | xcsf | The XCSF data structure. |
| [in] | x | The input feature variables. |
| [out] | pred | The calculated XCSF predictions. |
| [in] | n_samples | The number of instances. |
| [in] | cover | If cover is not NULL and the match set is empty, the prediction array will be set to this value instead of covering. |
Definition at line 141 of file xcs_supervised.c.
References param_set_explore(), and xcs_supervised_trial().
Referenced by XCS::predict().
Calculates the XCSF error for the input data.
| [in] | xcsf | The XCSF data structure. |
| [in] | data | The input data to calculate the error. |
| [in] | cover | If cover is not NULL and the match set is empty, the prediction array will be set to this value instead of covering. |
Definition at line 161 of file xcs_supervised.c.
References Input::n_samples, param_set_explore(), Input::x, Input::x_dim, xcs_supervised_trial(), Input::y, and Input::y_dim.
Referenced by XCS::fit(), XCS::score(), and xcs_supervised_score_n().
| double xcs_supervised_score_n | ( | struct XCSF * | xcsf, |
| const struct Input * | data, | ||
| const int | N, | ||
| const double * | cover | ||
| ) |
Calculates the XCSF error for a subsample of the input data.
| [in] | xcsf | The XCSF data structure. |
| [in] | data | The input data to calculate the error. |
| [in] | N | The maximum number of samples to draw randomly for scoring. |
| [in] | cover | If cover is not NULL and the match set is empty, the prediction array will be set to this value instead of covering. |
Definition at line 185 of file xcs_supervised.c.
References Input::n_samples, param_set_explore(), Input::x, Input::x_dim, xcs_supervised_sample(), xcs_supervised_score(), xcs_supervised_trial(), Input::y, and Input::y_dim.
Referenced by XCS::score().