A fuzzy logic C++ library
|
Generates dummy random data, just for testing the "learning" code. More...
Defines | |
#define | DEF_NB_INPUTS 3 |
default nb of inputs of FIS | |
#define | DEF_NB_POINTS 400 |
default nb of data points generated | |
#define | DEF_MIN_NBMF 3 |
default minimum nb of membership functions in set | |
#define | DEF_MAX_NBMF 6 |
default maximum nb of membership functions in set | |
#define | RAND_FLOAT(min, max) ( 1.0*rand()/RAND_MAX*((max)-(min))+(min) ) |
a macro that computes a pseudo-random floating-point value lying in the range [min,max] | |
#define | RAND_INT(min, max) ( rand()%((max)-(min))+(min) ) |
a macro that computes a pseudo-random integer value lying in the range [min,max] | |
#define | STDERR_FILE_NAME "stderr_test_learning_1.txt" |
Functions | |
int | main (int argc, char **argv) |
See test_learning_1.cpp. |
Generates dummy random data, just for testing the "learning" code.
Arguments:
This app:
#define DEF_NB_INPUTS 3 |
default nb of inputs of FIS
Referenced by main().
#define DEF_NB_POINTS 400 |
default nb of data points generated
Referenced by main().
#define DEF_MIN_NBMF 3 |
default minimum nb of membership functions in set
Referenced by main().
#define DEF_MAX_NBMF 6 |
default maximum nb of membership functions in set
Referenced by main().
#define RAND_FLOAT | ( | min, | |
max | |||
) | ( 1.0*rand()/RAND_MAX*((max)-(min))+(min) ) |
a macro that computes a pseudo-random floating-point value lying in the range [min,max]
Referenced by main().
#define RAND_INT | ( | min, | |
max | |||
) | ( rand()%((max)-(min))+(min) ) |
a macro that computes a pseudo-random integer value lying in the range [min,max]
Referenced by main().
#define STDERR_FILE_NAME "stderr_test_learning_1.txt" |
Referenced by main().
int main | ( | int | argc, |
char ** | argv | ||
) |
See test_learning_1.cpp.
Step 1 : setting up a fis with the correct nb of inputs and without any rules
Step 2 : generating random data points, creating a rule for each point vector, and creating the data file
References slifis::DATA_SET::AddDataPoint(), slifis::SLIFIS::AddInput(), APP_NAME, APP_REGULAR_END, slifis::DATA_SET::AssignDescription(), slifis::SLIFIS::BuildRuleBaseFromData(), DEF_MAX_NBMF, DEF_MIN_NBMF, DEF_NB_INPUTS, DEF_NB_POINTS, slifis::FUZZY_ROOT::GetNbMf(), slifis::SLIFIS::GetRuleBase(), slifis::RULE_BASE::Print(), RAND_FLOAT, RAND_INT, REOPEN_STDERR, slifis::SLIFIS::SetOutput(), slifis::DATA_POINT::SetValue(), STDERR_FILE_NAME, slifis::TYPE_MAMDANI, and slifis::TYPE_SUGENO.