Two C++ programs are required, genrules and fpa. In Java, they are combined in the FPA option (Learning menu, Induction submenu).They can also be used independently, by first generating the rules, then their conclusions.
Java interface:
This option behaves differently if there is a current data file or not.
Command lines:
Argument: FIS configuration file name
Optional arguments:
-fFISFile where File is the output FIS configuration filename (default value config.fis) |
-r to remove work files |
other options: associated to the call with a data file name (call genrules without argument to get their description). |
The created rules have a conclusion equal to one. They are stored in a file called 'system name'.rules, this filename appears in the Rules section of the output FIS configuration filename.
This program also creates an intermediate file called info.gen.
Command line example:
genrules iris-sr.fis
Creates the files config.fis (FIS) and info.gen.
or
genrules iriskm.fis -firiskmr.fis
Creates the file iriskmr.fis.
other example:
genrules irisreg.fis -firisregr.fis
Creates the file irisregr.fis
Arguments:
Optional arguments:
-a for detailed display |
-fFile where File is the output FIS configuration filename (default value: config.fpa) |
-sx where x is the strategy to determine the data subset used to initialize the rule conclusion, 0 for MIN, 1 for DEC (default value). |
-dy where y is the minimum matching degree for rule generation (default value: 0.3). |
-ez where z is the minimum cardinality (default value: 3) |
-tFileV data file name used for performance computation (default : data file) |
-u activity threshold for performance computation (default value: 0.1) |
-r to remove work files
|
The meaning of these parameters is given in the user guide, section Learning Menu, Generate conclusions. The number of generated rules is highly dependent on them.
Command line example:
fpa iriskmr.fis iris
Creates the file configfpa.fis, which has 26 rules, while there were 81 (3*3*3*3) rules in iriskmr.fis.
or
fpa iriskmr.fis iris -d0.1 -e1 -firiskmrfpa.fis
which creates the file iriskmrf.fis with 55 rules.
other example:
fpa irisregr.fis iris -d0.0 -e1 -firisregfpa.fis
which creates the file irisregfpa.fis with 36 rules..
. These configuration files are usable in the inference process.
Java Interface:
Learning menu, Rule induction submenu, wm option
Command line
The wm program requires the following arguments:
-tfile data file used for performance calculation (default is second argument) |
-oFIS the output FIS file name (default value 'system name'wm.fis). |
-sThresh activity threshold for performance calculation (default value=0.2) |
-l 'No limit for output distinct values in data file' (default=false) |
Command line example
wm iriskmr.fis iris
Creates the file iriswm.fis with 20 rules
or
wm iriskmr.fis iris -owmiris.fis
which creates the same file called wmiris.fis
Java Interface: Learning menu, Rule induction submenu, Tree option
Command line, :fistree program
The fistree program requires two arguments and has several optional arguments.
Arguments:
Optional parameters:
-oNum where Num is the output number (Default Value: 0, first output) |
-sx where x is the minimum membership for an item to be considered as attracted by the node for entropy calculations (default value 0.2) |
-xCard where Card is the minimum leaf cardinality (default=min(10,#rows/10)) |
-ty where y is the tolerance on the membership to the majority class (default value 0.1) |
-dn where n is the tree maximum depth (default value: 0, means no limit) |
-gval where val is the minimum relative entropy/deviance gain for splitting nodes (default value 1e-6) |
-e0 absolute entropy gain, -e1 relative gain (default=absolute) |
-gval where val is the minimum entropy/deviance relative gainen entropie/deviance required to create a branch |
-p0 no pruning, -p1 full split pruning according to a performance criterion, -p2 leaf pruning according to a performance criterion (default is no pruning) |
-lw where w is the relative performance loss tolerated during tree pruning (default value 0.0) |
-vValidFile where ValidFile is the validation file name for performance calculation during pruning (default is data file) |
-a detailed display |
-a0 semi detailed display |
Tree building, as well as tree pruning, creates two files. Output filenames are generated from the FIS configuration filename. The file with the .tree suffix contains a tree summary, which can be viewed in the java interface, or studied in a text editor. The second file is the corresponding FIS configuration file. It has a .fis suffix.
A file called result.fistree is also created. It is similar to the file result.simple created by the fisimple program (see 5), with some extra information specific to fuzzy trees.
The tree is a regression tree (used criterion=deviance) if the output declared in the FIS configuration file is fuzzy, with non discrete MFs. Otherwise it is a classification tree (used criterion=entropy), with inferred values corresponding to crisp classes if the output is crisp, with the flag classif=yes, or else to fuzzy classes.
Command line example:
fistree iriskmr.fis iris -s0.3
Creates iriskmr.fis.sum.tree and iriskmr.fis.tree.fis, which has 9 rules.
fistree iriskmr.fis iris -s0.1 -p1 -l0.1
Creates the two files above, plus two files for the pruned tree, iriskmr.fis.prunedsum.tree and iriskmr.fis.prunedtree.fis. In this case, the minimum membership threshold is lower than in the previous example, which produces a tree with 34 rules before pruning and 4 after pruning.
To generate the FIS configuration file corresponding to a given MF combination, two C++ programs are required, sethfpfis et hfpfis. In Java, they are combined in a single option.
In C++:
Three arguments are required:
Command line example:
sethfpfis iriskm.hfp "5 2 3 3" irissel.hfp
Creates the file irissel.hfp
Java Interface:
Learning menu, Partitions submenu, HFP MF submenu, Edit HFP file option
Arguments:
the FIS configuration file name |
the data file name |
-r: choose wm as rule induction method (default: fpa is used) |
-tx where x is the strategy to determine the data subset used to initialize the rule conclusion, 0 for MIN, 1 for DEC (default value) |
-my where y is the minimum matching degree (default value: 0.3). |
-ez where z is the minimum cardinality (default value: 3) |
-oFile where File is the output FIS configuration filename (default 'system name'.fis) |
-sw where ww is the minimum cumulated weight for a rule to be generated (0.0 default value) |
-lFileV whereFileV is the name of the vertex file created by hfpvertex (default value: vertices.'Hierarchy') |
-pNum whereNum is the output number (default value: 0, first output) |
Command line example:
hfpfis iris irissel.hfp -e2 -m0.3 -oirissel.fis -liris.sommets
Creates the file irissel.fis with 13 rules.