public class TemporalEvaluator
extends java.lang.Object
Constructor and Description |
---|
TemporalEvaluator() |
Modifier and Type | Method and Description |
---|---|
void |
execute()
During the evaluation, it will replay the ratings, try to predict each one, and write the prediction, TARMSE and the rating to the output file
|
java.nio.file.Path |
getExtendedOutputFile()
Get the output file for extended output (lines of JSON).
|
int |
getListSize() |
java.nio.file.Path |
getOutputFile() |
long |
getRebuildPeriod() |
TemporalEvaluator |
setAlgorithm(AlgorithmInstance algo)
Adds an algorithmInfo
|
TemporalEvaluator |
setAlgorithm(java.lang.String name,
LenskitConfiguration config)
An algorithm instance constructed with a name and Lenskit configuration
|
TemporalEvaluator |
setDataSource(DataAccessObject dao) |
TemporalEvaluator |
setDataSource(java.io.File file) |
TemporalEvaluator |
setExtendedOutputFile(java.io.File file)
Set the output file for extended output (lines of JSON).
|
TemporalEvaluator |
setExtendedOutputFile(java.nio.file.Path file)
Set the output file for extended output (lines of JSON).
|
TemporalEvaluator |
setListSize(int lSize)
sets the size of recommendationss list size
|
TemporalEvaluator |
setOutputFile(java.io.File file) |
TemporalEvaluator |
setRebuildPeriod(long seconds) |
TemporalEvaluator |
setRebuildPeriod(long time,
java.util.concurrent.TimeUnit unit) |
public TemporalEvaluator setAlgorithm(AlgorithmInstance algo)
Adds an algorithmInfo
algo
- The algorithmInfo addedpublic TemporalEvaluator setAlgorithm(java.lang.String name, LenskitConfiguration config)
An algorithm instance constructed with a name and Lenskit configuration
name
- Name of algorithm instanceconfig
- Lenskit configurationpublic TemporalEvaluator setDataSource(DataAccessObject dao)
dao
- The datasource to be added to the command.public TemporalEvaluator setDataSource(java.io.File file) throws java.io.IOException
file
- The file contains the ratings input datajava.io.IOException
public TemporalEvaluator setOutputFile(java.io.File file)
file
- The file set as the output of the command@Nullable public java.nio.file.Path getExtendedOutputFile()
Get the output file for extended output (lines of JSON).
public TemporalEvaluator setExtendedOutputFile(@Nullable java.io.File file)
Set the output file for extended output (lines of JSON).
file
- The output file name.public TemporalEvaluator setExtendedOutputFile(@Nullable java.nio.file.Path file)
Set the output file for extended output (lines of JSON).
file
- The output file name.public TemporalEvaluator setRebuildPeriod(long time, java.util.concurrent.TimeUnit unit)
time
- The time to rebuildunit
- Unit of time setpublic TemporalEvaluator setRebuildPeriod(long seconds)
seconds
- default rebuild period in secondspublic TemporalEvaluator setListSize(int lSize)
sets the size of recommendationss list size
lSize
- size of list to be setpublic java.nio.file.Path getOutputFile()
public long getRebuildPeriod()
public int getListSize()
public void execute() throws java.io.IOException, RecommenderBuildException
During the evaluation, it will replay the ratings, try to predict each one, and write the prediction, TARMSE and the rating to the output file
java.io.IOException
RecommenderBuildException