class TrainTest extends LenskitTask
Run a train-test evaluation.
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.Object> |
cacheDirectory The cache directory for the recommender. |
Property<java.lang.Boolean> |
continueAfterError Configure whether the evaluation will continue after errors. |
Property<java.lang.Object> |
outputFile The output file for recommendation output. |
Property<java.lang.Integer> |
parallelTasks Then number of parallel tasks to allow. |
Property<java.lang.Boolean> |
shareModelComponents Configure whether the evaluator should share model components between algorithms. |
Property<java.io.File> |
specFile The file name for writing out the experiment description. |
Property<java.lang.Integer> |
threadCount The thread count for the evaluator. |
Property<java.lang.Object> |
userOutputFile The user output file for recommendation output. |
Constructor and description |
---|
TrainTest
() |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
algorithm(java.lang.String name, java.lang.Object file) Load one or more algorithms from a file. |
|
void |
algorithm(java.lang.Object file) Load one or more algorithms from a file. |
|
void |
cacheDirectory(java.lang.Object obj) |
|
void |
continueAfterError(boolean v) |
|
void |
dataSet(java.util.Map ds) Add a data set. |
|
void |
dataSet(java.lang.Object ds) Add a data set. |
|
java.lang.Object |
dataSet(org.lenskit.gradle.DataSetProvider cf) Add a data sets produced by a crossfold task. |
|
void |
dataSet(groovy.lang.Closure block) Configure a train-test data set. |
|
java.lang.Object |
dataSet(java.util.Map<java.lang.String, java.lang.Object> options, org.lenskit.gradle.DataSetProvider cf) Add a data sets produced by a crossfold task or other data set provider. |
|
void |
doPrepare() |
|
java.lang.String |
getCommand() |
|
java.util.List |
getCommandArgs() |
|
java.lang.Object |
getJson() |
|
java.util.Set<java.io.File> |
getOutputFiles() |
|
void |
outputFile(java.lang.Object obj) |
|
void |
parallelTasks(int x) |
|
void |
predict(groovy.lang.Closure block) Configure a prediction task. |
|
void |
rank(groovy.lang.Closure block) Configure a rank effectiveness task. |
|
void |
recommend(groovy.lang.Closure block) Configure a top-N recommendation task. |
|
void |
shareModelComponents(boolean v) |
|
void |
threadCount(int x) |
|
void |
userOutputFile(java.lang.Object obj) |
The cache directory for the recommender.
Configure whether the evaluation will continue after errors.
The output file for recommendation output.
Then number of parallel tasks to allow.
Configure whether the evaluator should share model components between algorithms.
The file name for writing out the experiment description. Do not change unless absolutely necessary.
The thread count for the evaluator.
The user output file for recommendation output.
Load one or more algorithms from a file.
name
- The algorithm name.file
- The file.Load one or more algorithms from a file.
file
- The algorithm fileAdd a data set.
ds
- The data set configuration to add.Add a data set.
ds
- The file of the data set to add.Add a data sets produced by a crossfold task.
ds
- The crossfold tasks to add.Configure a train-test data set.
block
- A block which will be used to configure a data set.Add a data sets produced by a crossfold task or other data set provider.
This method supports options for adding the crossfolded data sets:
true
, isolates each of the data sets from each other and from other data sets by assigning
each a random isolation group ID.options
- Options for adding the data sets.ds
- The crossfold tasks to add.Configure a prediction task.
block
- The block.Configure a rank effectiveness task. This is built on recommend(Closure), but sets options to defaults that make the resulting task a rank effectiveness measure when used with suitable metrics such as NDCG.
block
- The configuration block.Configure a top-N recommendation task.
block
- The block.