public class FuzzyAntecedent
extends java.lang.Object
implements java.lang.Comparable
Title: Fuzzy Antecedent
Description: Fuzzy Antecedent for a variable in the GP-COACH algorithm
Company: KEEL
Constructor and Description |
---|
FuzzyAntecedent()
Default constructor
|
FuzzyAntecedent(DataBase database,
int var_selected)
Constructor with parameters.
|
FuzzyAntecedent(FuzzyAntecedent original)
Copy constructor for a FuzzyAntecedent from another FuzzyAntecedent
|
FuzzyAntecedent(FuzzyAntecedent original,
double[][] granularity_tuning)
Constructor for a FuzzyAntecedent that builds it from another FuzzyAntecedent applying a lateral tuning
|
FuzzyAntecedent(Fuzzy label,
int var_selected,
int max)
Constructor with parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
addLabel(DataBase data)
Adds randomly a label to the label set of this fuzzy antecedent
|
void |
changeLabel(DataBase data)
Changes randomly a label from the label set of this fuzzy antecedent to a non-existing label
in this fuzzy antecedent
|
void |
changeLabels(FuzzyAntecedent var_fuzzy,
DataBase data)
Change the labels associated to this fuzzy antecedent with the labels of the given
antecedent
|
int |
compareTo(java.lang.Object a)
Compares this object with the specified object for order, according to the number of variable measure
|
void |
deleteLabel()
Deletes randomly a label from the label set of this fuzzy antecedent
|
boolean |
equals(java.lang.Object o)
Compares this FuzzyAntecedent with another FuzzyAntecedent to check if both FuzzyAntecedents are equal
|
int |
getAttribute()
Obtains the variable related to the fuzzy antecedent
|
int |
getMaxLabels()
Obtains the maximum number of labels this fuzzy antecedent can handle
|
int |
getnLabels()
Obtains the number of labels used in this fuzzy antecedent as condition
|
int |
hashCode()
Computes the hash code associated to the current FuzzyAntecedent
|
boolean |
isAny()
Checks if the fuzzy antecedent represents an any condition.
|
boolean |
isValid()
Checks if the fuzzy antecedent is a valid and representative antecedent for a rule
or not.
|
double |
matchingDegree(double value,
int t_conorm)
Computes the matching degree of a specified value with a set of fuzzy labels, using
a specified t_conorm as OR operator
|
void |
mixLabels(FuzzyAntecedent var_fuzzy)
Mix the labels associated to this FuzzyAntecedent with the labels associated to
another FuzzyAntecedent
|
java.lang.String |
printString()
String representation of a Fuzzy Antecedent in the GP-COACH algorithm.
|
public FuzzyAntecedent()
public FuzzyAntecedent(DataBase database, int var_selected)
database
- Data Base associated to the rule that uses this antecedentvar_selected
- Specified variable that uses this antecedentpublic FuzzyAntecedent(Fuzzy label, int var_selected, int max)
label
- Fuzzy label given to create this fuzzy antecedentvar_selected
- Specified variable that uses this antecedentmax
- Maximum number of labels this antecedent can toleratepublic FuzzyAntecedent(FuzzyAntecedent original)
original
- FuzzyAntecedent which will be used as base to create another FuzzyAntecedentpublic FuzzyAntecedent(FuzzyAntecedent original, double[][] granularity_tuning)
original
- FuzzyAntecedent which will be used as base to create another FuzzyAntecedentgranularity_tuning
- Matrix codifying the lateral tuning used to create the new FuzzyAntecedentpublic boolean isValid()
public boolean isAny()
public int getAttribute()
public int getnLabels()
public double matchingDegree(double value, int t_conorm)
value
- Real value that is going to be matched with the fuzzy labels in this fuzzy antecedentt_conorm
- T-conorm used as OR operatorpublic void changeLabels(FuzzyAntecedent var_fuzzy, DataBase data)
var_fuzzy
- antecedent whose labels are going to be assigned to this antecedentdata
- data base containing all the information about the labels used in this
programpublic void mixLabels(FuzzyAntecedent var_fuzzy)
var_fuzzy
- antecedent whose labels are going to be mixed to this antecedentpublic void addLabel(DataBase data)
data
- data base containing all the information about the labels usedpublic void deleteLabel()
public void changeLabel(DataBase data)
data
- data base containing all the information about the labels usedpublic int getMaxLabels()
public java.lang.String printString()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- FuzzyAntecedent that is going to be compared with the current FuzzyAntecedentpublic int hashCode()
hashCode
in class java.lang.Object
public int compareTo(java.lang.Object a)
compareTo
in interface java.lang.Comparable
a
- Object to compare with.