public class PartitionScheme
extends java.lang.Object
This class implements a stratified scheme (equal number of examples of each class in each partition) to partition a dataset
Constructor and Description |
---|
PartitionScheme()
It reads the training set and creates the partitions
|
Modifier and Type | Method and Description |
---|---|
void |
createPartitionFiles()
It creates the files of each training and test partition
|
void |
deletePartitionFiles()
It deletes the files of each training and test partition
|
Instance[] |
getInstances()
It returns all the original instances
|
java.util.Vector[] |
getPartitions()
It returns the indexes of the original instances in all partitions
|
Instance[] |
getTestPartition(int num)
It returns the test partition specified
|
Instance[] |
getTrainPartition(int num)
It returns the training partition specified
|
public PartitionScheme()
It reads the training set and creates the partitions
public Instance[] getTrainPartition(int num)
It returns the training partition specified
num
- number of the partitionpublic Instance[] getTestPartition(int num)
It returns the test partition specified
num
- number of the partitionpublic Instance[] getInstances()
It returns all the original instances
public java.util.Vector[] getPartitions()
It returns the indexes of the original instances in all partitions
public void createPartitionFiles()
It creates the files of each training and test partition
public void deletePartitionFiles()
It deletes the files of each training and test partition