XCSF
1.4.7
XCSF learning classifier system
|
Self-adaptive mutation functions. More...
Go to the source code of this file.
Macros | |
#define | MU_EPSILON 0.0005 |
smallest mutation rate allowable More... | |
#define | N_RATES (10) |
number of mutation rates for rate selection adaptation More... | |
Functions | |
void | sam_init (double *mu, const int N, const int *type) |
Initialises self-adaptive mutation rates. More... | |
void | sam_adapt (double *mu, const int N, const int *type) |
Self-adapts mutation rates. More... | |
void | sam_json_import (double *mu, const int N, const cJSON *json) |
Initialises a mutation vector from a cJSON object. More... | |
Variables | |
static const double | mrates [(10)] |
Values for rate selection adaptation. More... | |
#define N_RATES (10) |
void sam_adapt | ( | double * | mu, |
const int | N, | ||
const int * | type | ||
) |
Self-adapts mutation rates.
[in,out] | mu | Vector of mutation rates. |
[in] | N | Number of mutation rates. |
[in] | type | Vector specifying each rate type. |
Definition at line 68 of file sam.c.
References clamp(), mrates, MU_EPSILON, N_RATES, rand_normal(), rand_uniform(), rand_uniform_int(), SAM_LOG_NORMAL, SAM_RATE_SELECT, and SAM_UNIFORM.
Referenced by act_integer_mutate(), cond_ellipsoid_mutate(), cond_rectangle_mutate(), cond_ternary_mutate(), graph_mutate(), neural_layer_connected_mutate(), neural_layer_convolutional_mutate(), neural_layer_lstm_mutate(), neural_layer_recurrent_mutate(), pred_nlms_mutate(), and tree_mutate().
void sam_init | ( | double * | mu, |
const int | N, | ||
const int * | type | ||
) |
Initialises self-adaptive mutation rates.
[out] | mu | Vector of mutation rates. |
[in] | N | Number of mutation rates. |
[in] | type | Vector specifying each rate type. |
Definition at line 43 of file sam.c.
References mrates, MU_EPSILON, N_RATES, rand_uniform(), rand_uniform_int(), SAM_LOG_NORMAL, SAM_RATE_SELECT, and SAM_UNIFORM.
Referenced by act_integer_init(), cond_ellipsoid_init(), cond_rectangle_init(), cond_ternary_init(), graph_init(), neural_layer_connected_init(), neural_layer_convolutional_init(), neural_layer_lstm_init(), neural_layer_recurrent_init(), pred_nlms_init(), and tree_rand().
void sam_json_import | ( | double * | mu, |
const int | N, | ||
const cJSON * | json | ||
) |
Initialises a mutation vector from a cJSON object.
[in,out] | mu | Vector of mutation rates. |
[in] | N | Number of mutation rates. |
[in] | json | cJSON object. |
Definition at line 100 of file sam.c.
Referenced by act_integer_json_import(), cond_ellipsoid_json_import(), cond_rectangle_json_import(), cond_ternary_json_import(), graph_json_import(), and pred_nlms_json_import().
|
static |
Values for rate selection adaptation.
Definition at line 33 of file sam.c.
Referenced by sam_adapt(), and sam_init().