public class DataBase
extends java.lang.Object
Title: DataBase
Description: Fuzzy Data Base
Copyright: Copyright KEEL (c) 2008
Company: KEEL
Constructor and Description |
---|
DataBase()
Default constructor.
|
DataBase(int nLabels,
myDataset train)
This method builds the database, creating the initial linguistic partitions
|
Modifier and Type | Method and Description |
---|---|
void |
decode(double[] gene)
Decode the gene representation for the GA into the DataBase one based on the Triangular Membership Functions
|
int[] |
getnLabels()
It return the whole array of number of labels for every attribute
|
int |
getnLabelsReal()
Returns the number of total real labels held by the input attributes.
|
double |
matching(int variable,
int label,
double value)
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)
This method builds the database, creating the initial linguistic partitions
nLabels
- Number of Linguistic Valuestrain
- Training datasetpublic void decode(double[] gene)
gene
- Gene representation of the individual being decoded.public int numVariables()
It returns the number of input attributes in the examples
public int getnLabelsReal()
Returns the number of total real labels held by the input attributes.
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)
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