public class FractionHistoryPartitionMethod extends 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(Object o) |
int |
hashCode() |
int |
partition(List<? extends Event> data)
Compute a partition of of the data.
|
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(List<? extends Event> data)
HistoryPartitionMethod
Compute a partition of of the data.
partition
in interface HistoryPartitionMethod
data
- The data to partition.