public class FractionHistoryPartitionMethod extends java.lang.Object implements HistoryPartitionMethod
Partition a list by fraction.
| Constructor and Description |
|---|
FractionHistoryPartitionMethod(double f)
The fraction to hold out (put in the second partition).
|
| 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 FractionHistoryPartitionMethod(double f)
The fraction to hold out (put in the second partition).
f - The fraction of users to hold out.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