SLIM
1.0
Sparse Linear Methods (SLIM) for top-n recommender systems
|
This file contains all the routines for SLIM testing. More...
#include <slim.h>
Go to the source code of this file.
Functions | |
void | slim_predict (ctrl_t *ctrl, gk_csr_t *train, gk_csr_t *test, gk_csr_t *model) |
SLIM testing. | |
double * | slim_test (ctrl_t *ctrl, gk_csr_t *model, gk_csr_t *train, gk_csr_t *test) |
Top-N recommendations and evaluations. | |
int | suggest_predict (ctrl_t *ctrl, gk_csr_t *model, int **iidx, gk_csr_t *train, int u, gk_dkv_t **rcmd) |
Top-N recommendation for a user. | |
This file contains all the routines for SLIM testing.
Definition in file slim_predict.c.
void slim_predict | ( | ctrl_t * | ctrl, |
gk_csr_t * | train, | ||
gk_csr_t * | test, | ||
gk_csr_t * | model | ||
) |
SLIM testing.
This routine contains the testing method for SLIM
[in] | ctrl | A ctrl structure which contains all the Parameters for SLIM testing |
[in] | train | The training data, which has been used to learn the model |
[in] | test | The testing data |
[in] | model | The model |
Definition at line 26 of file slim_predict.c.
References ctrl_t::nratings, and slim_test().
Referenced by main().
double* slim_test | ( | ctrl_t * | ctrl, |
gk_csr_t * | model, | ||
gk_csr_t * | train, | ||
gk_csr_t * | test | ||
) |
Top-N recommendations and evaluations.
[in] | ctrl | A ctrl structure |
[in] | model | A model |
[in] | train | The training data from which the model is learned |
[in] | test | The testing data |
Definition at line 60 of file slim_predict.c.
References ctrl_t::dbglvl, display_timer(), end_timer(), ctrl_t::nratings, ctrl_t::pred_file, start_timer(), and suggest_predict().
Referenced by slim_predict().
int suggest_predict | ( | ctrl_t * | ctrl, |
gk_csr_t * | model, | ||
int ** | iidx, | ||
gk_csr_t * | train, | ||
int | u, | ||
gk_dkv_t ** | rcmd | ||
) |
Top-N recommendation for a user.
[in] | ctrl | A ctrl structure |
[in] | model | A model |
[in] | iidx | An auxiliary array for efficient recommendations |
[in] | train | Training data from which the model is learned |
[in] | u | The index of the user for which the top-n recommendations are generated |
[out] | rcmd | The list of recommendations, in which the keys are the recommendation scores and the values are the item indices |
Definition at line 228 of file slim_predict.c.
References ctrl_t::topn.
Referenced by slim_test().