Configuration

Database Configuration

The database configuration is located under [database].

KeyTypeDescriptionDefault
cache_storestringDatabase for data (supports MySQL/MongoDB)redis://127.0.0.1:6379
data_storestringDatabase for cache (supports Redis)mysql://root@tcp(127.0.0.1:3306)/gorse
auto_insert_userboolAutomatically insert new users when inserting new feedbacktrue
auto_insert_itemboolAutomatically insert new items when inserting new feedbacktrue

The DSN (Database Source Name) format of the data_store and cache_store is as follows.

  • Redis: redis://hostname:port
  • MySQL: mysql://[username[:password]@][protocol[(hostname:port)]]/database[?config1=value1&...configN=valueN]
  • MongoDB: mongodb://[username:password@]hostname1[:port1][,... hostnameN[:portN]]][/[database][?options]]

Similar Item Configuration

Similar item configurations are located under [similar].

KeyTypeDescriptionDefault
n_similarintNumber of similar items to cache, 0 means disabled100
update_periodintTime interval (in minutes) to update similar items60

Latest Item Configuration

The latest item configuration is located under [latest].

KeyTypeDescriptionDefault
n_latestintNumber of latest items to cache, 0 means disabled100
update_periodintTime interval to update the latest items (in minutes)10

The popular item configuration is located under [popular].

KeyTypeDescriptionDefault
n_popularintNumber of popular items to cache, 0 means disabled100
update_periodintTime interval to update popular items (in minutes)1440
time_windowintPopular items within the previous N days365

Collaborative Filtering Configuration

The collaborative filtering configuration is located under [cf].

KeyTypeDescriptionDefault
n_cfintNumber of collaborative filtering matched items, 0 means disabled800
cf_modelstringCollaborative filtering model (select from als, bpr and ccd)als
fit_periodintInterval (in minutes) to update the collaborative filtering model1440
predict_periodintUpdate collaborative filtering matched items interval (in minutes)60
feedback_typesintFeedback types used by collaborative filtering model[""]
fit_jobsintNumber of model training threads1
verboseintIteration interval for reporting costs and recommendation accuracy10
n_candidatesintNumber of candidates used to estimate the recommendation accuracy100
top_kintLength of the recommendation list to estimate the recommendation accuracy, i.e. N in NDCG@N10
n_test_usersintNumber of users in the test set (0 means use all users to test)0

The configurations related to the model hyper-parameters are as follows. The default values of hyper-parameters depend on the corresponding model settings.

KeyTypeDescriptionCorresponding model
lrfloatLearning rateBPR
regfloatRegularization coefficientBPR/ALS/CCD
n_epochsintNumber of iterationsBPR/ALS/CCD
n_factorsintNumber of latent factorsBPR/ALS/CCD
init_meanfloatMean of gaussian random initializerBPR/ALS/CCD
init_stdfloatStandard deviation of gaussian random initializerBPR/ALS/CCD
alphafloatWeight for negative samplesALS/CCD

Ranking Configuration

The ranking configuration is located under [rank].

KeyTypeDescriptionDefault
taskintTask type (r for regression, c for classification)r
feedback_typesintTypes of feedback used for ranking[""]
fit_periodintTime interval to update the ranking model (in minutes)1440
fit_jobsintNumber of threads for model training1
verboseintIteration interval for reporting costs and prediction accuracies10

The configurations related to the model hyper-parameters are as follows.

KeyTypeDescription
lrfloatLearning rate
regfloatRegularization coefficient
n_epochsintNumber of iterations
n_factorsintNumber of latent factors
init_meanfloatMean of gaussian random initializer
init_stdfloatStandard deviation of gaussian random initializer

Master Configuration

The master configuration is located under [cf].

KeyTypeDescriptionDefault
hoststringMaster node listening host127.0.0.1
portintMaster node listening port8086
jobsintNumber of working threads1
cluster_meta_timeoutintMetadata timeout60