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)
HistoryPartitionMethod
Compute a partition of of the data.
partition
in interface HistoryPartitionMethod
data
- The data to partition.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object