public class Riona
extends java.lang.Object
Main procedures of Rionasd algorithm
Constructor and Description |
---|
Riona()
Riona default constructor
|
Riona(java.lang.String trainFile,
java.lang.String testFile,
java.lang.String trainOutFile,
java.lang.String testOutFile,
java.lang.String fOut,
long lSeed)
Riona constructor
|
Modifier and Type | Method and Description |
---|---|
Complex |
createRuleTestTrain(double[] tst,
int numItst,
double[] trn,
int numItrn,
int clase,
int nClasses,
boolean es_train)
Creates a local rule
|
int |
findOptimalK(int kmax)
Calculates the optimum size of the neighborhood for the training set
|
boolean |
isConsistent(Complex R,
int[] verifySet,
int util)
Inidcates if a rule is consistent with a determined set of examples
|
public Riona()
Riona default constructor
public Riona(java.lang.String trainFile, java.lang.String testFile, java.lang.String trainOutFile, java.lang.String testOutFile, java.lang.String fOut, long lSeed)
Riona constructor
trainFile
- Training dataset file.testOutFile
- Test output file.testFile
- Test dataset file.trainOutFile
- Traininf output file.fOut
- Output file.lSeed
- Seed for random purpose.public Complex createRuleTestTrain(double[] tst, int numItst, double[] trn, int numItrn, int clase, int nClasses, boolean es_train)
Creates a local rule
tst
- the test examplenumItst
- the position of the example in the settrn
- the train examplenumItrn
- the position of the example in the setclase
- the consequent of the rulenClasses
- the total number of classeses_train
- identify if it is a training process.public boolean isConsistent(Complex R, int[] verifySet, int util)
Inidcates if a rule is consistent with a determined set of examples
R
- rule to check.verifySet
- set of examples.util
- size of the set.public int findOptimalK(int kmax)
Calculates the optimum size of the neighborhood for the training set
kmax
- max malue for neighborhood size