mulan.data
Class LabelPowersetStratification

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

public class LabelPowersetStratification
extends Object
implements Stratification, TechnicalInformationHandler

Class for stratifying data based on label combinations

Version:
2012.05.08
Author:
Grigorios Tsoumakas

Constructor Summary
LabelPowersetStratification()
          Default constructor
LabelPowersetStratification(int aSeed)
          Constructor setting the 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

LabelPowersetStratification

public LabelPowersetStratification()
Default constructor


LabelPowersetStratification

public LabelPowersetStratification(int aSeed)
Constructor setting the random seed

Parameters:
aSeed -
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