public enum SubsampleMode extends Enum<SubsampleMode>
Modifier and Type | Method and Description |
---|---|
abstract void |
doSample(DataSource source,
RatingWriter output,
double fraction,
Random rng)
Write a random subset of all objects chosen by mode to the output file.
|
static SubsampleMode |
valueOf(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(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic abstract void doSample(DataSource source, RatingWriter output, double fraction, Random rng) throws IOException
source
- The DAO of the data source fileoutput
- The table output to output the ratingfraction
- The fraction of data to keep.IOException
- if there is an error sampling the data set.