Gorse open source recommender system engine
postgresql://
and rediss://
(#499).chhttps://
(#508).cache_store
(#406).cache_store
(#415).cache_store
(#414).Action | Cache | Data | Before | After |
---|---|---|---|---|
Insert 1,000 users | Redis | MySQL | 75ms | 38ms |
Insert 1,000 items | Redis | MySQL | 324ms | 32ms |
Insert 1,000 feedbacks | Redis | MySQL | 248ms | 42ms |
write-back-delay
parameter of GET /api/recommend/{user-id}
requires time unit now. For example:curl -X GET "http://172.18.0.3:8087/api/recommend/zhenghaoz?write-back-type=read&write-back-delay=10m&n=10" \
-H "accept: application/json" \
-H "X-API-Key: 19260817"
float32
(#394).check_recommend_period
and epsilon_time
.[server]
# ...
epsilon_time = 5 # clock error in the cluster in seconds
[recommend]
# ...
# The time period to check recommendation for users (minutes). The default values is 1.
check_recommend_period = 1
# Replace historical items back to recommendations.
enable_replacement = false
# Decay the weights of replaced items from positive feedbacks.
positive_replacement_decay = 0.8
# Decay the weights of replaced items from read feedbacks.
read_replacement_decay = 0.6
redis-cli KEYS "offline_recommend*" | xargs redis-cli DEL
dashboard_user_name
and dashboard_password
are empty, login authorization will be skipped.dashboard_user_name = "admin" # dashboard user name
dashboard_password = "password" # dashboard password
redis-cli KEYS "item_neighbors*" | xargs redis-cli DEL
Environment Variable | Configuration | |
---|---|---|
GORSE_CACHE_STORE | cache_store |
database for caching. |
GORSE_DATA_STORE | data_store |
database for persist data. |
GORSE_MASTER_PORT | port |
master port |
GORSE_MASTER_HOST | host |
master host |
GORSE_MASTER_HTTP_PORT | http_port |
HTTP API port |
GORSE_MASTER_HTTP_HOST | http_host |
HTTP API host |
GORSE_MASTER_JOBS | n_jobs |
number of working jobs |
GORSE_SERVER_API_KEY | api_key |
secret key for RESTful APIs |
enable_xxx_index
to enable experimental features.xxx_index_recall
is the expected recall of approximate searching.xxx_index_fit_epoch
is the number of epochs to adapt indices.These approximate vector searching indices trade tolerable accuracy (recall) with larger throughput. The index builder tries to reach xxx_index_recall
in xxx_index_fit_epoch
. The building process will stop when xxx_index_recall
or xxx_index_fit_epoch
reached. Index-based searching costs more memory than brute force searching and its building process costs additional time, but they are negligible compared to the benefits.
# Enable approximate item neighbor searching using vector index.
enable_item_neighbor_index = false
# Minimal recall for approximate item neighbor searching.
item_neighbor_index_recall = 0.8
# Maximal number of fit epochs for approximate item neighbor searching vector index.
item_neighbor_index_fit_epoch = 3
# Enable approximate user neighbor searching using vector index.
enable_user_neighbor_index = false
# Minimal recall for approximate user neighbor searching.
user_neighbor_index_recall = 0.8
# Maximal number of fit epochs for approximate user neighbor searching vector index.
user_neighbor_index_fit_epoch = 3
# Enable approximate collaborative filtering recommend using vector index.
enable_collaborative_index = false
# Minimal recall for approximate collaborative filtering recommend.
collaborative_index_recall = 0.9
# Maximal number of fit epochs for approximate collaborative filtering recommend vector index.
collaborative_index_fit_epoch = 3
redis-cli KEYS "item_neighbors*" | xargs redis-cli DEL
redis-cli KEYS "user_neighbors*" | xargs redis-cli DEL