public class ProcDataset
extends java.lang.Object
Process the KEEL dataset
Constructor and Description |
---|
ProcDataset(java.lang.String nfexamples,
boolean train)
Init a new set of instances
|
Modifier and Type | Method and Description |
---|---|
int |
datasetType()
Returs the type of the dataset 0-Modelling, 1-Clasiffication, 2-Clustering
|
void |
generateResultsClasification(java.lang.String Foutput,
int[] real,
int[] obtained)
Generates output file for a clasification problem
|
void |
generateResultsModeling(java.lang.String Foutput,
double[] real,
double[] obtained)
Generates output file for a modelling problem
|
void |
generateResultsModeling(java.lang.String Foutput,
int[] real,
int[] obtained)
Generates output file for a modelling problem
|
int[] |
getC()
Returns the outputs of each example (classification).
|
double[] |
getimax()
Returns the maximum values of each input attribute.
|
double[] |
getimin()
Returns the minimum values of each input attribute.
|
int |
getnclasses()
Returns the number of classes.
|
int |
getndata()
Returns the number of examples.
|
int |
getninputs()
Returns the number of input attributes.
|
int |
getnvariables()
Returns the number of variables.
|
double |
getomax()
Returns the maximum value of the output.
|
double |
getomin()
Returns the minimun value of the output.
|
double[][] |
getX()
Returns the whole input data.
|
double[] |
getY()
Returns the outputs of each example (regression).
|
boolean |
isMissing(int i,
int j)
Returns True if the value of j-th attribute of the i-th instance is missing and false, otherwise.
|
void |
processClassifierDataset()
Process a dataset for classification
|
void |
processClusterDataset(java.lang.String nfexamples,
boolean train)
Process a Dataset for clustering
|
void |
processModelDataset()
Process a dataset for modelling
|
public ProcDataset(java.lang.String nfexamples, boolean train) throws java.io.IOException
Init a new set of instances
nfexamples
- Name of the dataset filetrain
- The dataset file is for training or for testjava.io.IOException
- if there is any semantical, lexical or sintactical error in the input file.public double[][] getX()
public double[] getY()
public int[] getC()
public double[] getimax()
public double[] getimin()
public double getomax()
public double getomin()
public int getndata()
public int getnvariables()
public int getninputs()
public int getnclasses()
public boolean isMissing(int i, int j)
i
- instance's position.j
- attribute's position.public int datasetType()
Returs the type of the dataset 0-Modelling, 1-Clasiffication, 2-Clustering
public void processClassifierDataset() throws java.io.IOException
Process a dataset for classification
java.io.IOException
- if the dataset is not appropriate for this algorithmpublic void processModelDataset() throws java.io.IOException
Process a dataset for modelling
java.io.IOException
- if the dataset is not appropriate for this algorithmpublic void processClusterDataset(java.lang.String nfexamples, boolean train) throws java.io.IOException
Process a Dataset for clustering
nfexamples
- train
- java.io.IOException
- if the dataset is not appropriate for this algorithmpublic void generateResultsModeling(java.lang.String Foutput, int[] real, int[] obtained)
Generates output file for a modelling problem
Foutput
- Name of the output filereal
- Vector of outputs instancesobtained
- Vector of net outputspublic void generateResultsModeling(java.lang.String Foutput, double[] real, double[] obtained)
Generates output file for a modelling problem
Foutput
- Name of the output filereal
- Vector of outputs instancesobtained
- Vector of net outputspublic void generateResultsClasification(java.lang.String Foutput, int[] real, int[] obtained)
Generates output file for a clasification problem
Foutput
- Name of the output filereal
- Vector of outputs instancesobtained
- Vector of net outputs