public class HandlerNB
extends java.lang.Object
| Constructor and Description |
|---|
HandlerNB()
Default constructor.
|
HandlerNB(double[][] train,
int[] clasesTrain,
double[][] test,
int[] clasesTest,
int clases)
Parameter constructor.
|
HandlerNB(InstanceSet train,
InstanceSet test)
Parameter constructor.
|
HandlerNB(java.lang.String train,
java.lang.String test,
int ninstances,
int nClasses)
Parameter constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deleteFiles()
Deletes all the files generated.
|
void |
ejecutar(double[][] train,
int[] clasesTrain,
double[][] test,
int[] clasesTest,
int clases)
Executes the algorithms with the datasets given.
|
void |
generateFiles_Instance(InstanceSet train,
InstanceSet test)
Executes the algorithms with the datasets given and generates the files with the results.
|
void |
generateFiles()
Executes the algorithm and generates the files with the results.
|
int[] |
getPredictions()
Returns the predictions for each instance.
|
double[][] |
getProbabilities()
Returns the classes probabilities.
|
public HandlerNB()
public HandlerNB(java.lang.String train,
java.lang.String test,
int ninstances,
int nClasses)
throws java.lang.Exception
train - Training dataset filename.test - Test dataset filename.ninstances - number of instances.nClasses - number of classes.java.lang.Exception - if the algorithm can not be executed (problems with the files or the datasets given).public HandlerNB(InstanceSet train, InstanceSet test) throws java.lang.Exception
train - Training instances set.test - Test instances set.java.lang.Exception - if the algorithm can not be executed (problems with the files or the datasets given).public HandlerNB(double[][] train,
int[] clasesTrain,
double[][] test,
int[] clasesTest,
int clases)
throws java.lang.Exception
train - Training input dataset as arrays.clasesTrain - Training output dataset as arrays.test - Test input dataset as arrays.clasesTest - Test output dataset as arrays.clases - numnber of classesjava.lang.Exception - if the algorithm can not be executed (problems with the files or the datasets given).public void ejecutar(double[][] train,
int[] clasesTrain,
double[][] test,
int[] clasesTest,
int clases)
throws java.lang.Exception
train - Training input dataset as arrays.clasesTrain - Training output dataset as arrays.test - Test input dataset as arrays.clasesTest - Test output dataset as arrays.clases - numnber of classesjava.lang.Exception - if the algorithm can not be executed (problems with the files or the datasets given).public void generateFiles_Instance(InstanceSet train, InstanceSet test) throws java.lang.Exception
train - Training instances set.test - Test instances set.java.lang.Exception - if the algorithm can not be executed (problems with the files or the datasets given).public void generateFiles()
throws java.lang.Exception
java.lang.Exception - if the algorithm can not be executed (problems with the files or the datasets given).public void deleteFiles()
public int[] getPredictions()
public double[][] getProbabilities()