public enum SubsampleMode extends java.lang.Enum<SubsampleMode>
Modifier and Type | Method and Description |
---|---|
abstract void |
doSample(DataSource source,
RatingWriter output,
double fraction,
java.util.Random rng)
Write a random subset of all objects chosen by mode to the output file.
|
static SubsampleMode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static SubsampleMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SubsampleMode RATING
public static final SubsampleMode ITEM
public static final SubsampleMode USER
public static SubsampleMode[] values()
for (SubsampleMode c : SubsampleMode.values()) System.out.println(c);
public static SubsampleMode valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic abstract void doSample(DataSource source, RatingWriter output, double fraction, java.util.Random rng) throws java.io.IOException
source
- The DAO of the data source fileoutput
- The table output to output the ratingfraction
- The fraction of data to keep.java.io.IOException
- if there is an error sampling the data set.