public class myDataset
extends java.lang.Object
Title: Dataset
Description: It contains the methods to read a Dataset for creating Association Rules
Company: KEEL
Modifier and Type | Field and Description |
---|---|
static int |
INTEGER
Number to represent type of variable integer.
|
static int |
NOMINAL
Number to represent type of variable nominal.
|
static int |
REAL
Number to represent type of variable real or double.
|
Constructor and Description |
---|
myDataset()
Init a new set of instances
|
Modifier and Type | Method and Description |
---|---|
int |
getAttributeType(int n_attr)
It returns the type of the attribute in "n_attr"
|
double[] |
getemax()
It returns an array with the maximum values of the attributes
|
double[] |
getemin()
It returns an array with the minimum values of the attributes
|
double |
getMax(int variable)
It returns the upper bound of the variable
|
double |
getMin(int variable)
It returns the lower bound of the variable
|
boolean[] |
getMissing(int pos)
It returns an array indicating the position of the missing values on a specific example
|
java.lang.String |
getNameVar(int pos)
It returns the name of the variable in "pos"
|
int |
getnTrans()
It gets the size of the data-set
|
int |
getnVars()
It gets the number of variables of the data-set
|
double[][] |
getRealTransactions()
Outputs an array of transactions with their corresponding attribute values.
|
boolean |
hasMissingAttributes()
It checks if the data-set has any missing value
|
boolean |
hasNumericalAttributes()
It checks if the data-set has any numerical value (real or integer)
|
boolean |
hasRealAttributes()
It checks if the data-set has any real value
|
boolean |
isInteger(int pos)
Checks if the type of the attribute with the given id is integer.
|
boolean |
isMissing(int i,
int j)
This function checks if the attribute value is missing
|
boolean |
isNominal(int pos)
Checks if the type of the attribute with the given id is nominal.
|
boolean |
isReal(int pos)
Checks if the type of the attribute with the given id is real.
|
java.lang.String[] |
names()
It returns the names of the variables
|
int |
numberValues(int attribute)
It returns the number of different values in the case of a nominal variable
|
void |
readDataSet(java.lang.String datasetFile)
It reads the whole input data-set and it stores each transaction in
local array
|
int |
sizeWithoutMissing()
It return the size of the data-set without having account the missing values
|
public static final int NOMINAL
public static final int INTEGER
public static final int REAL
public double[][] getRealTransactions()
public double[] getemax()
public double[] getemin()
public boolean isInteger(int pos)
pos
- attribute id.public boolean isNominal(int pos)
pos
- attribute id.public boolean isReal(int pos)
pos
- attribute id.public double getMax(int variable)
variable
- Id otf the attributepublic double getMin(int variable)
variable
- Id of the attributepublic int getnTrans()
public int getnVars()
public boolean isMissing(int i, int j)
i
- int Example idj
- int Variable idpublic void readDataSet(java.lang.String datasetFile) throws java.io.IOException
datasetFile
- String name of the file containing the data-setjava.io.IOException
- If there occurs any problem with the reading of the data-setpublic boolean hasRealAttributes()
public boolean hasNumericalAttributes()
public boolean hasMissingAttributes()
public int sizeWithoutMissing()
public int numberValues(int attribute)
attribute
- Id of the variablepublic boolean[] getMissing(int pos)
pos
- int Id of the examplepublic java.lang.String[] names()
public java.lang.String getNameVar(int pos)
pos
- int Id of the variablepublic int getAttributeType(int n_attr)
n_attr
- int Id of the attribute