public class ConjuntoDatos
extends java.lang.Object
Title: ConjuntoDatos (Dataset)
Description: Dataset class represents the dataset read from data files and is used by the ACO algorithm.
Constructor and Description |
---|
ConjuntoDatos()
Default constructor.
|
ConjuntoDatos(java.util.Vector datos)
Parameter constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
eliminaMuestra(int indice)
Removes an example with the given position.
|
boolean |
eliminaMuestra(Muestra muestra)
Removes the given example from the dataset.
|
void |
eliminaMuestrasCubiertas(Regla regla)
Removes from dataset the covered cases by the given rule.
|
void |
imprimir(java.lang.String nombre)
Prints the dataset on the standard output.
|
void |
insertaMuestra(Muestra ejemplo)
Adds the given example to the dataset.
|
float[] |
listaProbabilidadesAtributoClase(Atributo atributo,
java.util.Vector clases)
Returns the probabilities vector related to examples with the pair attribute-value and the list of existing classes given.
|
int |
obtenerMayorClase(java.util.Vector listaClases)
Returns the majority class of the dataset (most frequent class).
|
Muestra |
obtenerMuestra()
Returns the first example of the dataset.
|
Muestra |
obtenerMuestra(int indice)
Returns the example in the position given.
|
java.util.Vector |
obtenerMuestras()
Returns all the examples in the dataset.
|
float |
porcentajeMuestrasCubiertas(Regla regla)
Computes the percentage of examples of the dataset covered by the given rule.
|
int |
tamanio()
Returns the number of examples in the dataset.
|
public ConjuntoDatos()
public ConjuntoDatos(java.util.Vector datos)
datos
- Vector with the examples to include in the dataset built.public void insertaMuestra(Muestra ejemplo)
ejemplo
- given example to be added.public void eliminaMuestra(int indice)
indice
- int position of the example to be removed.public boolean eliminaMuestra(Muestra muestra)
muestra
- Muestra
given example to be removed.public Muestra obtenerMuestra()
Muestra
the first example of the dataset.public Muestra obtenerMuestra(int indice)
indice
- int given position of the example asked.Muestra
the example in the position given.public void imprimir(java.lang.String nombre)
nombre
- String Name of the dataset.public int tamanio()
public float[] listaProbabilidadesAtributoClase(Atributo atributo, java.util.Vector clases)
atributo
- Atributo
pair attribute and value.clases
- Vector of existing classes.public void eliminaMuestrasCubiertas(Regla regla)
regla
- Regla
given rule that cover the different cases to be removed.public float porcentajeMuestrasCubiertas(Regla regla)
regla
- Regla
given rule to check with.public java.util.Vector obtenerMuestras()
Muestra
in the dataset.public int obtenerMayorClase(java.util.Vector listaClases)
listaClases
- Vector of existing classes.