class TrainTest extends LenskitTask
Run a train-test evaluation.
Fields inherited from class | Fields |
---|---|
class ConventionTask |
TASK_NAME, TASK_DESCRIPTION, TASK_GROUP, TASK_TYPE, TASK_DEPENDS_ON, TASK_OVERWRITE, TASK_ACTION |
Type | Name and description |
---|---|
java.lang.Object |
cacheDirectory The cache directory for the recommender. |
java.lang.Object |
outputFile The output file for recommendation output. |
boolean |
shareModelComponents Configure whether the evaluator should share model components between algorithms. |
java.io.File |
specFile The file name for writing out the experiment description. |
int |
threadCount The thread count for the evaluator. |
java.lang.Object |
userOutputFile The user output file for recommendation output. |
Constructor and description |
---|
TrainTest
() |
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 |
dataSet(java.util.Map ds) Add a data set. |
void |
dataSet(java.lang.Object ds) Add a data set. |
java.lang.Object |
dataSet(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, 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 |
perform() |
void |
predict(groovy.lang.Closure block) Configure a prediction task. |
void |
recommend(groovy.lang.Closure block) Configure a prediction task. |
The cache directory for the recommender.
The output file for recommendation output.
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 prediction task.
block
- The block.