public class HoldoutNHistoryPartitionMethod extends java.lang.Object implements HistoryPartitionMethod
Partition the last part of list by holding out a fixed number of elements.
| Constructor and Description |
|---|
HoldoutNHistoryPartitionMethod(int n)
Create a count partitioner.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
int |
partition(java.util.List<? extends Rating> data)
Compute a partition of of the data.
|
java.lang.String |
toString() |
public HoldoutNHistoryPartitionMethod(int n)
Create a count partitioner.
n - The number of items to put in the second partition.public int partition(java.util.List<? extends Rating> data)
HistoryPartitionMethodCompute a partition of of the data.
partition in interface HistoryPartitionMethoddata - The data to partition.public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object