public class BaseR
extends java.lang.Object
Company: KEEL
Constructor and Description |
---|
BaseR()
Default constructor.
|
BaseR(myDataset train,
java.lang.String reglas)
Creates a rulebase using the rules of a existing decision tree given as an argument.
|
Modifier and Type | Method and Description |
---|---|
boolean |
clasifica(boolean tree,
double[] ejemplo,
java.lang.StringBuffer clase_)
Classifies an example given as an argument using rather a decision tree based rules or genetic algorithm based.
|
void |
cubrirEjemplos()
Detect the rules that cover a small-disjunct set of instances.
|
BaseR |
genetico(int type,
int S,
int nGenerations,
int popSize,
double crossProb,
double mutProb)
Executes a genetic algorithm to generate the rules of the cassifier.
|
java.lang.String |
printString()
Returns a String representation of all the rules collected.
|
int |
size()
Return the number of existing rules in the rulebase.
|
public BaseR()
public BaseR(myDataset train, java.lang.String reglas)
reglas
- String file name that contains a rulabase.train
- myDataset training dataset.public BaseR genetico(int type, int S, int nGenerations, int popSize, double crossProb, double mutProb)
type
- type of the GA: 0 Small scheme or 1 Large_SN schemeS
- rules covers threshold.nGenerations
- number of generation for the genetic optimization.popSize
- size of the population used in the GA.crossProb
- Cross probability.mutProb
- Mutation probability.public java.lang.String printString()
public int size()
public void cubrirEjemplos()
public boolean clasifica(boolean tree, double[] ejemplo, java.lang.StringBuffer clase_)
tree
- true if the rules are DT based or false if they are GA based.ejemplo
- example to be classified.clase_
- StringBuffer value of the class predicted after the execution of this method.