public class Regla
extends java.lang.Object
Title: Regla
Description: Contains the definition of a fuzzy rule
Copyright: Copyright (c) 2009
Company: KEEL
Constructor and Description |
---|
Regla(BaseD dataBase,
int compatibilityType)
Constructor with parameters
|
Regla(Regla r)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
void |
adjustWeight(double adjust)
It modifies the rule weight adding a given quantity
|
void |
asignaConsecuente(myDataset train,
int ruleWeight)
It assigns the rule weight to the rule
|
void |
assignAntecedent(int[] antecedent)
Sets the antecedents with the given array.
|
void |
calcula_consecuente(myDataset train)
It computes the best consequent (class and rule weight) for the given rule
|
Regla |
clone()
It creates a copy of the rule
|
double |
compatibilidad(double[] example)
It computes the compatibility of the rule with an input example
|
void |
setclas(int clas)
It assigns the class of the rule
|
public Regla(Regla r)
r
- Regla the rule to be copiedpublic Regla(BaseD dataBase, int compatibilityType)
dataBase
- database to set to the rule.compatibilityType
- int compatibility type.public void assignAntecedent(int[] antecedent)
antecedent
- antecedents to be set.public void calcula_consecuente(myDataset train)
train
- the training data-set (set of examples)public void setclas(int clas)
clas
- intpublic void asignaConsecuente(myDataset train, int ruleWeight)
train
- myDataset the training setruleWeight
- int the type of rule weightpublic double compatibilidad(double[] example)
example
- double[] The input examplepublic void adjustWeight(double adjust)
adjust
- double the value to be added to the rule weightpublic Regla clone()
clone
in class java.lang.Object