org.mymedialite.data
Class PosOnlyFeedbackSimpleSplit<T extends IPosOnlyFeedback>

java.lang.Object
  extended by org.mymedialite.data.PosOnlyFeedbackSimpleSplit<T>
All Implemented Interfaces:
ISplit<IPosOnlyFeedback>

public class PosOnlyFeedbackSimpleSplit<T extends IPosOnlyFeedback>
extends java.lang.Object
implements ISplit<IPosOnlyFeedback>

simple split for item prediction from implicit feedback. The dataset must not be modified after the split - this would lead to undefined behavior.


Constructor Summary
PosOnlyFeedbackSimpleSplit(IPosOnlyFeedback feedback, double ratio, T train, T test)
          Create a simple split of positive-only item prediction data.
 
Method Summary
 int numberOfFolds()
          The number of folds in this split.
 java.util.List<IPosOnlyFeedback> test()
          Test data for the different folds.
 java.util.List<IPosOnlyFeedback> train()
          Training data for the different folds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PosOnlyFeedbackSimpleSplit

public PosOnlyFeedbackSimpleSplit(IPosOnlyFeedback feedback,
                                  double ratio,
                                  T train,
                                  T test)
Create a simple split of positive-only item prediction data.

Parameters:
feedback - the dataset
ratio - the ratio of positive events to use for validation
Method Detail

numberOfFolds

public int numberOfFolds()
Description copied from interface: ISplit
The number of folds in this split.

Specified by:
numberOfFolds in interface ISplit<IPosOnlyFeedback>
Returns:
The number of folds in this split

train

public java.util.List<IPosOnlyFeedback> train()
Description copied from interface: ISplit
Training data for the different folds.

Specified by:
train in interface ISplit<IPosOnlyFeedback>
Returns:
A list of T

test

public java.util.List<IPosOnlyFeedback> test()
Description copied from interface: ISplit
Test data for the different folds.

Specified by:
test in interface ISplit<IPosOnlyFeedback>
Returns:
A list of T