public class RetainNHistoryPartitionMethod extends java.lang.Object implements HistoryPartitionMethod
Partition the event list by retaining a fixed number of elements.
| Constructor and Description |
|---|
RetainNHistoryPartitionMethod(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 RetainNHistoryPartitionMethod(int n)
Create a count partitioner.
n - The number of items to put in the train 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