Evaluator
Created on 23 January 2014
Evaluator for the test.fm framework
-
class testfm.evaluation.evaluator.Evaluator(use_multi_threading=True)[source]
Takes the model,testing data and evaluation measure and spits out the score.
-
evaluate_model(factor_model, testing_data, measures=None, all_items=None, non_relevant_count=100, k=None)[source]
Evaluate the model using some testing data in pandas.DataFrame. The Evaluator check if the model in evaluation
is able to be executed with multi-threading. If so it executes a low level routine using C-Threads otherwise
execute a single thread routine.
Parameters: |
- factor_model – An instance that Should implement IModel
- measures – List of measure we want to compute. They should implement IMeasure. Default: MAPMeasure
- all_items – List of items available in the data set (used for negative sampling). If set to None, only
testing items will be used.
- non_relevant_count – int number of non relevant items to add to the list for performance evaluation
|
Returns: | List of score corresponding to measures
|
-
evaluate_model_rmse(model, testing_data)[source]
This is just a hack to evaluate RMSE. Nobody should bother with RMSE anymore, so no good support for it.