public class myDataset
extends java.lang.Object
Title: myDataset
Description: It contains the methods to read a Classification/Regression Dataset
Company: KEEL
Modifier and Type | Field and Description |
---|---|
InstanceSet |
IS
The whole instance set.
|
Constructor and Description |
---|
myDataset()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
calculaMasComunes()
Computes the most frequent values for every attribute.
|
java.lang.String |
copyHeader()
It copies the header of the dataset
|
java.lang.String[] |
dameClases()
It returns the name of every output values (possible classes).
|
java.lang.String[] |
dameNombres()
It returns the name of every input attributes.
|
double[][] |
dameRangos()
Returns the minimum and maximum values of every attributes as a matrix.
|
int[] |
dameTipos()
Returns the type of each input attribute
|
java.lang.String[][] |
dameValores()
Returns the values as String for every attribute.
|
int[] |
getC()
Returns the output of the data-set as integer values
|
double[] |
getemaximo()
It returns an array with the maximum values of the attributes
|
double[] |
geteminimo()
It returns an array with the minimum values of the attributes
|
int |
getnclases()
It gets the number of output attributes of the data-set (for example number of classes in classification)
|
int |
getndatos()
It gets the size of the data-set
|
int |
getnentradas()
It gets the number of input attributes of the data-set
|
int |
getnvariables()
It gets the number of variables of the data-set (including the output)
|
double[][] |
getX()
Outputs an array of examples with their corresponding attribute values.
|
boolean |
hayAtributosContinuos()
It checks if the data-set has any real value
|
boolean |
isMissing(int i,
int j)
This function checks if the attribute value is missing
|
int |
masComun(int i)
Returns the most frequent value of the ith attribute.
|
void |
readClassificationSet(java.lang.String datasetFile,
boolean train)
It reads the whole input data-set and it stores each example and its associated output value in
local arrays to ease their use.
|
int[] |
tiposVar()
Returns the type of each input attribute (NOMINAL = 0 OR NUMERIC = 1)
|
double[] |
valoresMin()
It returns an array with the minimum values of the attributes
|
public InstanceSet IS
public double[][] getX()
public int[] getC()
public double[] getemaximo()
public double[] geteminimo()
public int getndatos()
public int getnvariables()
public int getnentradas()
public int getnclases()
public boolean isMissing(int i, int j)
i
- int Example idj
- int Variable idpublic void readClassificationSet(java.lang.String datasetFile, boolean train) throws java.io.IOException
datasetFile
- String name of the file containing the datasettrain
- boolean It must have the value "true" if we are reading the training data-setjava.io.IOException
- If there ocurs any problem with the reading of the data-setpublic java.lang.String copyHeader()
public int[] tiposVar()
public void calculaMasComunes()
public int masComun(int i)
i
- int Number of the attributepublic double[][] dameRangos()
public int[] dameTipos()
public java.lang.String[] dameNombres()
public java.lang.String[] dameClases()
public java.lang.String[][] dameValores()
public double[] valoresMin()
public boolean hayAtributosContinuos()