public class Instances
extends java.lang.Object
Title: Intances class
Description: it stores the dataset in a way that this Rule learning algorithm can understand.
Company: KEEL
Constructor and Description |
---|
Instances()
Default constructor.
|
Instances(double[][] e,
java.lang.String[] o,
int num_a,
int n_class)
Parameter constructor.
|
Modifier and Type | Method and Description |
---|---|
java.util.LinkedList<java.lang.Double> |
getExample(int i)
Returns the example in the position given.
|
int |
getnClass()
Returns the number of classes or output values.
|
int |
getnData()
Returns the number of examples.
|
int |
getnInputs()
Returns the number of attributes of the dataset.
|
java.lang.String |
getOutputAsString(int i)
Returns the output value of the example in the position given.
|
boolean |
isEmpty()
Checks if the dataset is empty.
|
void |
removeInstance(int i)
Removes the example in the given position.
|
void |
removeInstances(java.util.LinkedList<java.lang.Integer> eliminar)
Removes all the examples whose indeces are given as parameter.
|
public Instances()
public Instances(double[][] e, java.lang.String[] o, int num_a, int n_class)
e
- double[][] examples of the dataset.o
- String[] Outputs of the examples.num_a
- not used.n_class
- number of classes in the dataset.public java.lang.String getOutputAsString(int i)
i
- int given index/position.public int getnInputs()
public int getnData()
public int getnClass()
public java.util.LinkedList<java.lang.Double> getExample(int i)
i
- int given index/position.public void removeInstance(int i)
i
- int given index/position.public void removeInstances(java.util.LinkedList<java.lang.Integer> eliminar)
eliminar
- LinkedListpublic boolean isEmpty()