XCSF 1.4.8
XCSF learning classifier system
Loading...
Searching...
No Matches
param.h
Go to the documentation of this file.
1/*
2 * This program is free software: you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation, either version 3 of the License, or
5 * (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 */
15
24#pragma once
25
26#include "loss.h"
27#include "xcsf.h"
28
29#define PARAM_INVALID (-1)
30#define PARAM_NOT_FOUND (0)
31#define PARAM_FOUND (1)
32
33char *
34param_json_export(const struct XCSF *xcsf);
35
36void
37param_json_import(struct XCSF *xcsf, const char *json_str);
38
39void
40param_free(struct XCSF *xcsf);
41
42void
43param_print(const struct XCSF *xcsf);
44
45void
46param_init(struct XCSF *xcsf, const int x_dim, const int y_dim,
47 const int n_actions);
48
49size_t
50param_load(struct XCSF *xcsf, FILE *fp);
51
52size_t
53param_save(const struct XCSF *xcsf, FILE *fp);
54
55/* setters */
56
57const char *
58param_set_omp_num_threads(struct XCSF *xcsf, const int a);
59
60const char *
61param_set_random_state(struct XCSF *xcsf, const int a);
62
63const char *
64param_set_population_file(struct XCSF *xcsf, const char *a);
65
66const char *
67param_set_pop_init(struct XCSF *xcsf, const bool a);
68
69const char *
70param_set_max_trials(struct XCSF *xcsf, const int a);
71
72const char *
73param_set_perf_trials(struct XCSF *xcsf, const int a);
74
75const char *
76param_set_pop_size(struct XCSF *xcsf, const int a);
77
78int
79param_set_loss_func_string(struct XCSF *xcsf, const char *a);
80
81void
82param_set_loss_func(struct XCSF *xcsf, const int a);
83
84const char *
85param_set_stateful(struct XCSF *xcsf, const bool a);
86
87const char *
88param_set_compaction(struct XCSF *xcsf, const bool a);
89
90const char *
91param_set_huber_delta(struct XCSF *xcsf, const double a);
92
93const char *
94param_set_gamma(struct XCSF *xcsf, const double a);
95
96const char *
97param_set_teletransportation(struct XCSF *xcsf, const int a);
98
99const char *
100param_set_p_explore(struct XCSF *xcsf, const double a);
101
102const char *
103param_set_alpha(struct XCSF *xcsf, const double a);
104
105const char *
106param_set_beta(struct XCSF *xcsf, const double a);
107
108const char *
109param_set_delta(struct XCSF *xcsf, const double a);
110
111const char *
112param_set_e0(struct XCSF *xcsf, const double a);
113
114const char *
115param_set_init_error(struct XCSF *xcsf, const double a);
116
117const char *
118param_set_init_fitness(struct XCSF *xcsf, const double a);
119
120const char *
121param_set_nu(struct XCSF *xcsf, const double a);
122
123const char *
124param_set_theta_del(struct XCSF *xcsf, const int a);
125
126const char *
127param_set_m_probation(struct XCSF *xcsf, const int a);
128
129const char *
130param_set_set_subsumption(struct XCSF *xcsf, const bool a);
131
132const char *
133param_set_theta_sub(struct XCSF *xcsf, const int a);
134
135const char *
136param_set_x_dim(struct XCSF *xcsf, const int a);
137
138const char *
139param_set_explore(struct XCSF *xcsf, const bool a);
140
141const char *
142param_set_y_dim(struct XCSF *xcsf, const int a);
143
144const char *
145param_set_n_actions(struct XCSF *xcsf, const int a);
Loss functions for calculating prediction error.
const char * param_set_compaction(struct XCSF *xcsf, const bool a)
Definition param.c:717
const char * param_set_pop_size(struct XCSF *xcsf, const int a)
Definition param.c:676
const char * param_set_stateful(struct XCSF *xcsf, const bool a)
Definition param.c:710
void param_json_import(struct XCSF *xcsf, const char *json_str)
Sets the parameters from a json formatted string.
Definition param.c:437
void param_print(const struct XCSF *xcsf)
Prints all XCSF parameters.
Definition param.c:481
const char * param_set_explore(struct XCSF *xcsf, const bool a)
Definition param.c:881
const char * param_set_n_actions(struct XCSF *xcsf, const int a)
Definition param.c:898
const char * param_set_init_fitness(struct XCSF *xcsf, const double a)
Definition param.c:814
const char * param_set_nu(struct XCSF *xcsf, const double a)
Definition param.c:824
const char * param_set_e0(struct XCSF *xcsf, const double a)
Definition param.c:794
const char * param_set_teletransportation(struct XCSF *xcsf, const int a)
Definition param.c:744
char * param_json_export(const struct XCSF *xcsf)
Returns a json formatted string representation of the parameters.
Definition param.c:113
const char * param_set_max_trials(struct XCSF *xcsf, const int a)
Definition param.c:656
const char * param_set_x_dim(struct XCSF *xcsf, const int a)
Definition param.c:871
void param_set_loss_func(struct XCSF *xcsf, const int a)
Definition param.c:699
const char * param_set_theta_del(struct XCSF *xcsf, const int a)
Definition param.c:834
const char * param_set_m_probation(struct XCSF *xcsf, const int a)
Definition param.c:844
const char * param_set_p_explore(struct XCSF *xcsf, const double a)
Definition param.c:754
const char * param_set_init_error(struct XCSF *xcsf, const double a)
Definition param.c:804
const char * param_set_population_file(struct XCSF *xcsf, const char *a)
Definition param.c:639
const char * param_set_random_state(struct XCSF *xcsf, const int a)
Definition param.c:627
const char * param_set_huber_delta(struct XCSF *xcsf, const double a)
Definition param.c:724
int param_set_loss_func_string(struct XCSF *xcsf, const char *a)
Definition param.c:686
void param_init(struct XCSF *xcsf, const int x_dim, const int y_dim, const int n_actions)
Initialises default XCSF parameters.
Definition param.c:45
const char * param_set_alpha(struct XCSF *xcsf, const double a)
Definition param.c:764
void param_free(struct XCSF *xcsf)
Definition param.c:93
const char * param_set_omp_num_threads(struct XCSF *xcsf, const int a)
Sets the number of OMP threads.
Definition param.c:614
const char * param_set_theta_sub(struct XCSF *xcsf, const int a)
Definition param.c:861
const char * param_set_set_subsumption(struct XCSF *xcsf, const bool a)
Definition param.c:854
const char * param_set_delta(struct XCSF *xcsf, const double a)
Definition param.c:784
const char * param_set_beta(struct XCSF *xcsf, const double a)
Definition param.c:774
const char * param_set_gamma(struct XCSF *xcsf, const double a)
Definition param.c:734
size_t param_load(struct XCSF *xcsf, FILE *fp)
Reads the XCSF data structure from a file.
Definition param.c:548
const char * param_set_pop_init(struct XCSF *xcsf, const bool a)
Definition param.c:649
const char * param_set_y_dim(struct XCSF *xcsf, const int a)
Definition param.c:888
size_t param_save(const struct XCSF *xcsf, FILE *fp)
Writes the XCSF data structure to a file.
Definition param.c:495
const char * param_set_perf_trials(struct XCSF *xcsf, const int a)
Definition param.c:666
XCSF data structure.
Definition xcsf.h:85
XCSF data structures.