class Crossfold extends LenskitTask
Crossfold a data set. This task can only crossfold a single data set; multiple tasks must be used to produce multiple cross-validation splits.
| Fields inherited from class | Fields |
|---|---|
class JavaExec |
TASK_NAME, TASK_DESCRIPTION, TASK_GROUP, TASK_TYPE, TASK_DEPENDS_ON, TASK_OVERWRITE, TASK_ACTION |
| Type | Name and description |
|---|---|
Property<java.lang.String> |
dataSetName |
boolean |
includeTimestamps |
java.lang.String |
method |
Property<java.lang.Object> |
outputDirThe output directory for cross-validation. |
java.lang.String |
outputFormat |
java.lang.Integer |
partitionCount |
java.lang.Integer |
sampleSize |
| Constructor and description |
|---|
Crossfold
() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
dataSetName(java.lang.String name) |
|
void |
doPrepare() |
|
java.lang.String |
getCommand() |
|
java.util.List |
getCommandArgs() |
|
java.io.File |
getDataSetFile() |
|
java.util.Set<java.io.File> |
getInputFiles() |
|
java.io.File |
getOutputDirectory() |
|
java.lang.Object |
holdout(int n, java.lang.String order = 'random')Hold out a fixed number of ratings per user |
|
java.lang.Object |
holdoutFraction(double f, java.lang.String order = 'random')Utility method to create a holdout-fraction user partition method. |
|
void |
input(java.lang.Object file)Set the input source manifest. |
|
void |
input(java.util.Map spec) |
|
void |
inputFile(java.lang.Object csv)Configure an input CSV file of ratings. |
|
void |
method(java.lang.String m)Set the method to use. |
|
void |
outputDir(java.lang.Object dir) |
|
void |
outputFormat(java.lang.String fmt)Specify an output format. |
|
java.lang.Object |
retain(int n, java.lang.String order = 'random')Utility method to create a retain-N user partition method. |
|
void |
userPartitionMethod(java.lang.Object nop)Deprecated method for user partitioning. |
The output directory for cross-validation. Defaults to "build/$name.out", where $name is the name of the task.
Hold out a fixed number of ratings per user
n - The number of ratings to hold out for each user.order - The sort order. Defaults to `random`.Utility method to create a holdout-fraction user partition method.
f - The fraction of ratings to hold out per user.order - The sort order. Defaults to `random`.Set the input source manifest.
file - The path to an input source manifest file (in YAML format).Configure an input CSV file of ratings. Convenience method; input(Object) is more general.
csv - A CSV file containing ratings.Set the method to use. Can be one of:
m - The methodSpecify an output format. Can be one of: - csv - gz
Utility method to create a retain-N user partition method.
n - The number of ratings to hold out for each user.order - The sort order. Defaults to `random`.Deprecated method for user partitioning.