public class DataBase
extends java.lang.Object
Constructor and Description |
---|
DataBase()
Default constructor.
|
DataBase(int nLabels,
myDataset train)
Parameters Constructor
|
Modifier and Type | Method and Description |
---|---|
int[] |
getnLabels()
It return the whole array of number of labels for every attribute
|
double |
matching(int variable,
int label,
double value)
It checks if the value of a specific label in a specific attribute matchs with a given value
|
int |
numLabels(int variable)
It returns the number of different labels that a specific input attribute can hold
|
int |
numVariables()
It returns the number of input attributes in the examples
|
java.lang.String |
print_triangle(int var,
int label)
It prints the values of the fuzzy label of the given variable
|
java.lang.String |
print(int var,
int label)
It prints an attribute with its label in a string way
|
java.lang.String |
printString()
It prints the whole database
|
void |
saveFile(java.lang.String filename)
It stores the data base in a given file
|
public DataBase()
public DataBase(int nLabels, myDataset train)
Parameters Constructor
nLabels
- int It is the number of membership functions for each real/integer variabletrain
- myDataset It contains the train data set with the whole information to execute the algorithmpublic int numVariables()
It returns the number of input attributes in the examples
public int numLabels(int variable)
It returns the number of different labels that a specific input attribute can hold
variable
- int The input attribute which we want to know the number of different labels it can havepublic int[] getnLabels()
It return the whole array of number of labels for every attribute
public double matching(int variable, int label, double value)
It checks if the value of a specific label in a specific attribute matchs with a given value
variable
- int Attribute which we are going to checklabel
- int Attribute's label we are going to checkvalue
- int Value to be comparedpublic java.lang.String print_triangle(int var, int label)
It prints the values of the fuzzy label of the given variable
var
- Attribute which we are going to checklabel
- Attribute's label we are going to checkpublic java.lang.String print(int var, int label)
It prints an attribute with its label in a string way
var
- int Attribute to be printedlabel
- int Attribute's label to be printedpublic java.lang.String printString()
It prints the whole database
public void saveFile(java.lang.String filename)
It stores the data base in a given file
filename
- String Name for the database file