mulan.data
Class IterativeStratification

java.lang.Object
  extended by mulan.data.IterativeStratification
All Implemented Interfaces:
Stratification, TechnicalInformationHandler

public class IterativeStratification
extends Object
implements Stratification, TechnicalInformationHandler

Class for stratifying data based on the iterative stratification method

Version:
2012.05.08
Author:
Konstantinos Sechidis, Grigorios Tsoumakas

Constructor Summary
IterativeStratification()
          Default constructor
IterativeStratification(long seed)
          Constructor setting a specific random seed
 
Method Summary
 TechnicalInformation getTechnicalInformation()
          Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.
 MultiLabelInstances[] stratify(MultiLabelInstances data, int folds)
          Creates a number of folds via stratified sampling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IterativeStratification

public IterativeStratification()
Default constructor


IterativeStratification

public IterativeStratification(long seed)
Constructor setting a specific random seed

Parameters:
seed -
Method Detail

getTechnicalInformation

public TechnicalInformation getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.

Specified by:
getTechnicalInformation in interface TechnicalInformationHandler
Returns:
the technical information about this class

stratify

public MultiLabelInstances[] stratify(MultiLabelInstances data,
                                      int folds)
Description copied from interface: Stratification
Creates a number of folds via stratified sampling

Specified by:
stratify in interface Stratification
Parameters:
data - a multi-label dataset
folds - the number of folds to sample
Returns:
an array of multi-label datasets, one for each fold