public class TemporalEvaluator extends 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
|
Path |
getExtendedOutputFile()
Get the output file for extended output (lines of JSON).
|
int |
getListSize() |
Path |
getOutputFile() |
long |
getRebuildPeriod() |
TemporalEvaluator |
setAlgorithm(AlgorithmInstance algo)
Adds an algorithmInfo
|
TemporalEvaluator |
setAlgorithm(String name,
LenskitConfiguration config)
An algorithm instance constructed with a name and Lenskit configuration
|
TemporalEvaluator |
setDataSource(BinaryRatingDAO dao) |
TemporalEvaluator |
setDataSource(File file) |
TemporalEvaluator |
setExtendedOutputFile(File file)
Set the output file for extended output (lines of JSON).
|
TemporalEvaluator |
setExtendedOutputFile(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(File file) |
TemporalEvaluator |
setRebuildPeriod(long seconds) |
TemporalEvaluator |
setRebuildPeriod(long time,
TimeUnit unit) |
public TemporalEvaluator setAlgorithm(AlgorithmInstance algo)
Adds an algorithmInfo
algo
- The algorithmInfo addedpublic TemporalEvaluator setAlgorithm(String name, LenskitConfiguration config)
An algorithm instance constructed with a name and Lenskit configuration
name
- Name of algorithm instanceconfig
- Lenskit configurationpublic TemporalEvaluator setDataSource(BinaryRatingDAO dao)
dao
- The datasource to be added to the command.public TemporalEvaluator setDataSource(File file) throws IOException
file
- The file contains the ratings input dataIOException
public TemporalEvaluator setOutputFile(File file)
file
- The file set as the output of the command@Nullable public Path getExtendedOutputFile()
Get the output file for extended output (lines of JSON).
public TemporalEvaluator setExtendedOutputFile(@Nullable File file)
Set the output file for extended output (lines of JSON).
file
- The output file name.public TemporalEvaluator setExtendedOutputFile(@Nullable Path file)
Set the output file for extended output (lines of JSON).
file
- The output file name.public TemporalEvaluator setRebuildPeriod(long time, 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 Path getOutputFile()
public long getRebuildPeriod()
public int getListSize()
public void execute() throws 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
IOException
RecommenderBuildException