gov.sandia.cognition.learning.data
Class DefaultPartitionedDataset<DataType>

java.lang.Object
  extended by gov.sandia.cognition.learning.data.DefaultPartitionedDataset<DataType>
Type Parameters:
DataType - The type of the data in the dataset.
All Implemented Interfaces:
PartitionedDataset<DataType>

public class DefaultPartitionedDataset<DataType>
extends Object
implements PartitionedDataset<DataType>

The PartitionedDataset class provides a simple container for the training and testing datasets to be held together.

Since:
3.0
Author:
Justin Basilico, Kevin R. Dixon

Constructor Summary
DefaultPartitionedDataset(Collection<DataType> trainingSet, Collection<DataType> testingSet)
          Creates a new instance of PartitionedDataset.
 
Method Summary
static
<DataType> DefaultPartitionedDataset<DataType>
create(Collection<DataType> trainingSet, Collection<DataType> testingSet)
          Convenience method to create a new DefaultPartitionedDataset from the two given collections.
 Collection<DataType> getTestingSet()
          Gets the testing dataset.
 Collection<DataType> getTrainingSet()
          Gets the training dataset.
protected  void setTestingSet(Collection<DataType> testingSet)
          Sets the testing set.
protected  void setTrainingSet(Collection<DataType> trainingSet)
          Sets the training set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPartitionedDataset

public DefaultPartitionedDataset(Collection<DataType> trainingSet,
                                 Collection<DataType> testingSet)
Creates a new instance of PartitionedDataset.

Parameters:
trainingSet - The training set.
testingSet - The testing set.
Method Detail

getTrainingSet

public Collection<DataType> getTrainingSet()
Description copied from interface: PartitionedDataset
Gets the training dataset.

Specified by:
getTrainingSet in interface PartitionedDataset<DataType>
Returns:
The training dataset.

getTestingSet

public Collection<DataType> getTestingSet()
Description copied from interface: PartitionedDataset
Gets the testing dataset.

Specified by:
getTestingSet in interface PartitionedDataset<DataType>
Returns:
The testing dataset.

setTrainingSet

protected void setTrainingSet(Collection<DataType> trainingSet)
Sets the training set.

Parameters:
trainingSet - The new training set.

setTestingSet

protected void setTestingSet(Collection<DataType> testingSet)
Sets the testing set.

Parameters:
testingSet - The new testing set.

create

public static <DataType> DefaultPartitionedDataset<DataType> create(Collection<DataType> trainingSet,
                                                                    Collection<DataType> testingSet)
Convenience method to create a new DefaultPartitionedDataset from the two given collections.

Type Parameters:
DataType - The type of the data in the dataset.
Parameters:
trainingSet - The training set.
testingSet - The testing set.
Returns:
A new default partitioned dataset with the given training and testing sets.