| Constructor and Description |
|---|
PredictEvalTask()
Create a new eval task.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMetric(PredictMetric<?> metric)
Add a prediction metric.
|
ConditionEvaluator |
createConditionEvaluator(AlgorithmInstance algorithm,
DataSet dataSet,
Recommender rec)
Set up a measurement of a single recommender.
|
void |
finish()
Finalize this eval task.
|
static PredictEvalTask |
fromJSON(com.fasterxml.jackson.databind.JsonNode json,
URI base)
Create a predict eval task from a JSON/YAML file.
|
List<Metric<?>> |
getAllMetrics()
Get the list of all metrics.
|
List<String> |
getGlobalColumns()
Get columns that will go in the aggregate output file.
|
Path |
getOutputFile()
Get the output file for writing predictions.
|
List<PredictMetric<?>> |
getPredictMetrics()
Get the list of prediction metrics.
|
Set<Class<?>> |
getRequiredRoots()
Get the root types required by this evaluation.
|
List<String> |
getUserColumns()
Get columns that will go in the per-user output file.
|
void |
setOutputFile(Path file)
Set the output file for predictions.
|
void |
start(ExperimentOutputLayout outputLayout)
Do initial setup for this eval task.
|
public static PredictEvalTask fromJSON(com.fasterxml.jackson.databind.JsonNode json, URI base) throws IOException
Create a predict eval task from a JSON/YAML file.
json - The task specification.base - The base URI from which json came, used for resolving relative paths.IOExceptionpublic Path getOutputFile()
Get the output file for writing predictions.
null if no file is configured.public void setOutputFile(Path file)
Set the output file for predictions.
file - The output file for writing predictions. Will get a CSV file.public List<PredictMetric<?>> getPredictMetrics()
Get the list of prediction metrics.
public List<Metric<?>> getAllMetrics()
Get the list of all metrics.
public void addMetric(PredictMetric<?> metric)
Add a prediction metric.
metric - The metric to add.public Set<Class<?>> getRequiredRoots()
EvalTaskGet the root types required by this evaluation.
getRequiredRoots in interface EvalTaskpublic List<String> getGlobalColumns()
EvalTaskGet columns that will go in the aggregate output file.
getGlobalColumns in interface EvalTaskpublic List<String> getUserColumns()
EvalTaskGet columns that will go in the per-user output file.
getUserColumns in interface EvalTaskpublic void start(ExperimentOutputLayout outputLayout)
EvalTaskDo initial setup for this eval task. This should create any per-task output files, etc.
public void finish()
EvalTaskFinalize this eval task. This should finish writing and close any per-task output files, etc.
public ConditionEvaluator createConditionEvaluator(AlgorithmInstance algorithm, DataSet dataSet, Recommender rec)
EvalTaskSet up a measurement of a single recommender.
createConditionEvaluator in interface EvalTaskalgorithm - The algorithm being evaluated.dataSet - The data set being evaluated.rec - The recommender to measure.