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)
Return a String representation of the Triangular Membership Functions of the variable and its label given as arguments.
|
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
- It is the number of membership functions for each real/integer variabletrain
- 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
- 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
- Attribute which we are going to checklabel
- Attribute's label we are going to checkvalue
- Value to be comparedpublic java.lang.String print_triangle(int var, int label)
var
- Index of the variable given.label
- Index of the label given.public java.lang.String print(int var, int label)
It prints an attribute with its label in a string way
var
- Attribute to be printedlabel
- 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
- Name for the database file