public class TableVar
extends java.lang.Object
Class defined to store the information of the variable of the dataset
Constructor and Description |
---|
TableVar()
Creates a new instance of TableVar
|
Modifier and Type | Method and Description |
---|---|
float |
Fuzzy(int i,
int j,
float X)
Return the belonging of a value
|
void |
GainInit(TableDat Examples,
java.lang.String nFile)
Computes and stores the information gain of each attribute (variable) of the dataset
|
boolean |
getContinuous(int pos)
Returns if the variable "pos" is or not continua
|
float |
getGain(int pos)
Returns the gain of the variable "pos"
|
float |
getMax(int pos)
Returns the maximum valid value for the variable "pos"
|
int |
getMaxLabel()
Returns the maximum number of labels of all the variables
|
int |
getMaxVal()
Returns the maximum number of values of all the variables
|
float |
getMin(int pos)
Returns the minimum valid value for the variable "pos"
|
java.lang.String |
getNameClassObj()
Returns the name of the class of the target variable
|
int |
getNClass()
Returns the number of classes of the target variable
|
int |
getNLabel()
Returns the number of labels for all the continuous variables
|
int |
getNLabelVar(int pos)
Returns the number of labels of the var indicated by "pos"
|
int |
getNumClassObj()
Returns the number of the class of the target variable
|
int |
getNVars()
Returns the number of variables
|
char |
getType(int pos)
Returns the type of the variable "pos"
|
float |
getX0(int i,
int j)
Method to return the value of the cut points X0
|
float |
getX1(int i,
int j)
Method to return the value of the cut points X1
|
float |
getX3(int i,
int j)
Method to return the value of the cut points X3
|
void |
InitSemantics(java.lang.String nFile)
Defined to manage de semantics of the linguistic variables
Generates the semantics of the linguistic variables using a partition
consisting of triangle simetrics fuzzy sets.
|
void |
Load(int size)
Fill TableVar with the characteristics of the variables and creates
characteristics and intervals for the fuzzy sets
|
float |
Round(float val,
float tope)
Rounds the generated value for the semantics when necesary
|
void |
setNameClassObj(java.lang.String clas)
Sets the name of the class of the target variable
|
void |
setNClass(int value)
Sets the number of classes of the target variable
|
void |
setNLabel(int val)
Sets the number of labels for all the continuous variables
|
void |
setNumClassObj(int clas)
Sets the number of the class of the target variable
|
public int getNVars()
Returns the number of variables
public int getNLabel()
Returns the number of labels for all the continuous variables
public void setNLabel(int val)
Sets the number of labels for all the continuous variables
val
- Number of linguistic labelspublic int getMaxLabel()
Returns the maximum number of labels of all the variables
public int getMaxVal()
Returns the maximum number of values of all the variables
public int getNClass()
Returns the number of classes of the target variable
public void setNClass(int value)
Sets the number of classes of the target variable
value
- Number of classespublic int getNumClassObj()
Returns the number of the class of the target variable
public void setNumClassObj(int clas)
Sets the number of the class of the target variable
clas
- Number of the class of the target variablepublic java.lang.String getNameClassObj()
Returns the name of the class of the target variable
public void setNameClassObj(java.lang.String clas)
Sets the name of the class of the target variable
clas
- Name of the target variablepublic float Fuzzy(int i, int j, float X)
Return the belonging of a value
i
- Position of the variablej
- Position of the valueX
- Valuepublic float getX0(int i, int j)
Method to return the value of the cut points X0
i
- Position of the variablej
- Position of the valuepublic float getX1(int i, int j)
Method to return the value of the cut points X1
i
- Position of the variablej
- Position of the valuepublic float getX3(int i, int j)
Method to return the value of the cut points X3
i
- Position of the variablej
- Position of the valuepublic float Round(float val, float tope)
Rounds the generated value for the semantics when necesary
val
- The value to roundtope
- public void InitSemantics(java.lang.String nFile)
Defined to manage de semantics of the linguistic variables Generates the semantics of the linguistic variables using a partition consisting of triangle simetrics fuzzy sets. The cut points al stored at 0.5 level of the fuzzy sets to be considered in the computation of the gain of information. Also writes the semantics of the linguistic variables in the specified file
nFile
- Name of file to write the semanticspublic void Load(int size)
Fill TableVar with the characteristics of the variables and creates characteristics and intervals for the fuzzy sets
size
- Number of variables of the datasetpublic float getMax(int pos)
Returns the maximum valid value for the variable "pos"
pos
- Position of the variablepublic float getMin(int pos)
Returns the minimum valid value for the variable "pos"
pos
- Position of the variablepublic int getNLabelVar(int pos)
Returns the number of labels of the var indicated by "pos"
pos
- Position of the variablepublic boolean getContinuous(int pos)
Returns if the variable "pos" is or not continua
pos
- Position of the variablepublic char getType(int pos)
Returns the type of the variable "pos"
pos
- Position of the variablepublic float getGain(int pos)
Returns the gain of the variable "pos"
pos
- Position of the variablepublic void GainInit(TableDat Examples, java.lang.String nFile)
Computes and stores the information gain of each attribute (variable) of the dataset
Examples
- Set of instances of the datasetnFile
- Name of the file