Cross Validation Tool

gorse test [model] [flags]

Flags

Stage Flag Description
Task –top int evaluate the model in top N ranking (default 10)
Loaders –load-builtin string using data from built-in
–load-csv string using data from a CSV file
–csv-header skip header (first line) for the CSV file
–csv-sep string separator for the CSV file (default “t”)
Splitters –split-fold int split data by k fold (default 5)
Parameters –set-alpha float alpha value, depends on context
–set-init-high float upper bound of uniform initial parameters
–set-init-low float lower bound of uniform initial parameters
–set-init-mean float mean of gaussian initial parameters
–set-init-std float standard deviation of gaussian initial parameters
–set-item-clusters int number of item clusters
–set-k string number of neighbors
–set-lr float learning rate
–set-mink string least number of neighbors
–set-n-epochs int number of epochs
–set-n-factors int number of factors
–set-random-state int random state (seed)
–set-reg float regularization strength
–set-shrinkage int shrinkage of similarity
–set-similarity string similarity metrics (pearson, cosine, msd)
–set-type string type for KNN (basic, centered, z_score, baseline)
–set-use-bias using bias
–set-user-based user based if true. otherwise item based
–set-user-clusters int number of user clusters
Evaluators –eval-mae evaluating the model by MAE
–eval-map evaluating the model by MAP@N
–eval-mrr evaluating the model by MRR@N
–eval-ndcg evaluating the model by NDCG@N
–eval-precision evaluating the model by Precision@N
–eval-recall evaluating the model by Recall@N
–eval-rmse evaluating the model by RMSE

Example

$ gorse test svd --load-builtin ml-100k --set-n-epochs 100 --set-reg 0.1 --set-init-std 0.01
2019/11/24 15:34:45 Load built-in dataset ml-100k
2019/11/24 15:34:45 Load hyper-parameters map[InitStdDev:0.01 NEpochs:100 Reg:0.1]
2019/11/24 15:34:45 Use 5-fold splitter
2019/11/24 15:34:45 Use evaluators [RMSE]
2019/11/24 15:34:45 Runtime options: verbose = true, fit_jobs = 1, cv_jobs = 1
2019/11/24 15:34:45 Fit SVD with hyper-parameters: use_bias = true, n_factors = 100, n_epochs = 100, lr = 0.005, reg = 0.1, init_mean = 0, init_stddev = 0.01
...
+------+----------+----------+----------+----------+----------+----------------------+
|      |  FOLD 1  |  FOLD 2  |  FOLD 3  |  FOLD 4  |  FOLD 5  |         MEAN         |
+------+----------+----------+----------+----------+----------+----------------------+
| RMSE | 0.902930 | 0.904696 | 0.914456 | 0.908324 | 0.906919 | 0.907465(±0.006991)  |
+------+----------+----------+----------+----------+----------+----------------------+
2019/11/24 15:35:11 Complete cross validation (26.326451613s7.0.0.)

This command tests svd on MovieLens 100K.

Table Of Contents