public class FuzzyClassifier extends Classifier
FuzzyClassifier is designed to allow a Fuzzy Classifier evolve by means of
an Genetic Algorithm (GA). This class is a specification of the class
Classifier
.
Constructor and Description |
---|
FuzzyClassifier(FuzzyClassifier c)
Copy constructor of this class, which clones its components
|
FuzzyClassifier(FuzzyPartition[] a,
FuzzyPartition b,
int tn,
int ag)
Class constructor using the following parameters:
|
Modifier and Type | Method and Description |
---|---|
Classifier |
clone()
This method clones the current object.
|
void |
debug()
This method prints information about the Rule Base useful for debugging purposes
|
double[] |
evaluate(double[] x)
This method evaluates the classifier for a given input example.
|
FuzzyRule |
getComponent(int n)
This method returns a
FuzzyRule component. |
int |
getNumConsequents()
This method returns the
RuleBase number of consequents. |
java.lang.String |
output()
This method prints information about the Rule Base useful for debugging purposes
|
void |
set(FuzzyClassifier c)
This method copies the given FuzzyClassifier in the current object.
|
void |
setComponent(int n,
FuzzyRule r)
|
int |
size()
This method returns the
RuleBase size. |
getMaximum
public FuzzyClassifier(FuzzyPartition[] a, FuzzyPartition b, int tn, int ag)
Class constructor using the following parameters:
a
- the input variables FuzzyPartition
arrayb
- the class variable FuzzyPartition
tn
- the t-norm to be usedag
- the aggregation operatorpublic FuzzyClassifier(FuzzyClassifier c)
Copy constructor of this class, which clones its components
c
- the FuzzyClassifier
to copypublic void set(FuzzyClassifier c)
This method copies the given FuzzyClassifier in the current object.
c
- the FuzzyClassifier
object to be assigned to the current onepublic double[] evaluate(double[] x)
This method evaluates the classifier for a given input example.
evaluate
in class Classifier
x
- array of doubles with the example to evaluate the classifierpublic void debug()
This method prints information about the Rule Base useful for debugging purposes
debug
in class Classifier
public java.lang.String output()
This method prints information about the Rule Base useful for debugging purposes
output
in class Classifier
public Classifier clone()
This method clones the current object.
clone
in class Classifier
Classifier
object which is a perfect copy of the current one.public int size()
This method returns the RuleBase
size.
public int getNumConsequents()
This method returns the RuleBase
number of consequents.
public FuzzyRule getComponent(int n)
This method returns a FuzzyRule
component.
n
- position of the component.FuzzyRule
component.