public class HandlerSMO
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
numClasses
Number of classes.
|
int |
numInstances
Number of instances.
|
int |
numPartitions
Number of partitions.
|
java.lang.String |
seed
Seed for random purposes.
|
java.lang.String |
testInputFile
Test dataset filename.
|
java.lang.String |
trainInputFile
Training dataset filename.
|
Constructor and Description |
---|
HandlerSMO(InstanceSet train,
InstanceSet test,
int clases,
java.lang.String Seed)
Parameter constructor.
|
HandlerSMO(int clases,
int instances,
java.lang.String Seed)
Parameter constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
deleteFiles()
Deletes all the files generated.
|
void |
generateFiles()
Generates the configuration files and the results files for the algorithm.
|
int[] |
getPredictions(int part)
Returns the predictions for a given partition.
|
double[][] |
getProbabilities()
Returns the classes probabilities.
|
public int numPartitions
public int numInstances
public int numClasses
public java.lang.String trainInputFile
public java.lang.String testInputFile
public java.lang.String seed
public HandlerSMO(int clases, int instances, java.lang.String Seed)
clases
- number of classes.instances
- number of instances.Seed
- seed for random purposes.public HandlerSMO(InstanceSet train, InstanceSet test, int clases, java.lang.String Seed) throws java.lang.Exception
train
- Training instances set.test
- Test instances set.clases
- number of classes.Seed
- seed for random purposes.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 files can not be generatedpublic void deleteFiles()
public int[] getPredictions(int part)
part
- given partition.public double[][] getProbabilities()