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)
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