From dfb2edc360a0ae886c76fa64a660a66f1eb26fbf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Oct 2025 00:14:24 +0000 Subject: [PATCH 1/2] Initial plan From c281005340bb347d21244b23745d5ebafeda10ad Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Oct 2025 00:25:20 +0000 Subject: [PATCH 2/2] Remove popular recommender documentation from all files Co-authored-by: zhenghaoz <9030120+zhenghaoz@users.noreply.github.com> --- src/docs/master/api/apidocs.md | 67 -------------------- src/docs/master/concepts/algorithms.md | 28 +------- src/docs/master/concepts/data-objects.md | 2 - src/docs/master/concepts/how-it-works.md | 33 ++++------ src/docs/master/concepts/non-personalized.md | 2 +- src/docs/master/config.md | 9 +-- src/zh/docs/master/api/apidocs.md | 67 -------------------- src/zh/docs/master/concepts/algorithms.md | 28 +------- src/zh/docs/master/concepts/data-objects.md | 2 - src/zh/docs/master/concepts/how-it-works.md | 21 +++--- src/zh/docs/master/config.md | 9 +-- 11 files changed, 27 insertions(+), 241 deletions(-) diff --git a/src/docs/master/api/apidocs.md b/src/docs/master/api/apidocs.md index f72bf7b..3e89e88 100644 --- a/src/docs/master/api/apidocs.md +++ b/src/docs/master/api/apidocs.md @@ -1169,73 +1169,6 @@ Get the latest items in category. ::: -::: details GET /api/popular - -Get popular items. - -#### Parameters - -| Name | Locate | Type | Description | Required | -|-|-|-|-|-| -| `n` | query | integer | Number of returned recommendations | | -| `offset` | query | integer | Offset of returned recommendations | | -| `user-id` | query | string | Remove read items of a user | | - -#### Response Body - -```json -[ - { - "Id": "crocodilia", - "Score": 3.1415926 - }, - { - "Id": "crocodilia", - "Score": 3.1415926 - }, - { - "Id": "crocodilia", - "Score": 3.1415926 - } -] -``` - -::: - -::: details GET /api/popular/{category} - -Get popular items in category. - -#### Parameters - -| Name | Locate | Type | Description | Required | -|-|-|-|-|-| -| `category` | path | string | Category of returned items. | ✅ | -| `n` | query | integer | Number of returned items | | -| `offset` | query | integer | Offset of returned items | | -| `user-id` | query | string | Remove read items of a user | | - -#### Response Body - -```json -[ - { - "Id": "crocodilia", - "Score": 3.1415926 - }, - { - "Id": "crocodilia", - "Score": 3.1415926 - }, - { - "Id": "crocodilia", - "Score": 3.1415926 - } -] -``` - -::: - ::: details GET /api/recommend/{user-id} Get recommendation for user. diff --git a/src/docs/master/concepts/algorithms.md b/src/docs/master/concepts/algorithms.md index a88ae75..659246a 100644 --- a/src/docs/master/concepts/algorithms.md +++ b/src/docs/master/concepts/algorithms.md @@ -32,7 +32,7 @@ The `` comes from the configuration file: ```toml [recommend] -# The cache size for recommended/popular/latest items. The default value is 100. +# The cache size for recommended/latest items. The default value is 100. cache_size = 100 ``` @@ -52,32 +52,6 @@ The latest items recommendation is equivalent to the following SQL: select item_id from items order by time_stamp desc limit ; ``` -### Popular Items - -Many websites show recent popular items to users such as Twitter trending. The popular items recommendation is equivalent to the following SQL: - -```sql -select item_id from ( - select item_id, count(*) as feedback_count from feedback - where feedback_type in - and time_stamp >= NOW() - INTERVAL - group by item_id) t -order by feedback_count desc limit ; -``` - -::: tip - -The ` ` in the configuration file corresponds to the window of popular items. - -```toml -[recommend.popular] - -# The time window of popular items. The default values is 4320h. -popular_window = "720h" -``` - -::: - ## Similarity Algorithms In some scenarios, users like specific types of items, for example, gamers like to solve puzzles and young children like to watch cartoons. diff --git a/src/docs/master/concepts/data-objects.md b/src/docs/master/concepts/data-objects.md index a41c14f..03e3406 100644 --- a/src/docs/master/concepts/data-objects.md +++ b/src/docs/master/concepts/data-objects.md @@ -71,8 +71,6 @@ Multiple categories can be distinguished by topics such as food, travel, etc., o |-|-|-| | `GET` | `/api/latest` | Get latest items. | | `GET` | `/api/latest/{category}` | Get latest items in specified category. | -| `GET` | `/api/popular` | Get popular items. | -| `GET` | `/api/popular/{category}` | Get popular items in specified category. | | `GET` | `/api/recommend/{user-id}` | Get recommendation for user. | | `GET` | `/api/recommend/{user-id}/{category}` | Get recommendation for user in specified category. | | `GET` | `/api/item/{item-id}/neighbors` | Get neighbors of a item. | diff --git a/src/docs/master/concepts/how-it-works.md b/src/docs/master/concepts/how-it-works.md index ff0bd9f..7fba745 100644 --- a/src/docs/master/concepts/how-it-works.md +++ b/src/docs/master/concepts/how-it-works.md @@ -8,7 +8,7 @@ The workflow of Gorse is depicted in the following flowchart: ```mermaid flowchart TD database[(Database)]--user, items and feedback-->load[Load dataset] - load--latest and popular items-->cache[(Cache)] + load--latest items-->cache[(Cache)] find_users--User Neighbors-->cache find_items--Item Neighbors-->cache subgraph Master Node @@ -21,12 +21,12 @@ flowchart TD cache2--cached recommendations-->api[RESTful APIs] database2[(Database)]<--user, items and feedback-->api subgraph Server Node - api<--popular and hidden items-->local_cache[Local Cache] + api<--hidden items-->local_cache[Local Cache] end cache--user neighbors-->user_based(User Similarity-based\nRecommendation) cache--item neighbors-->item_based(Item Similarity-based\nRecommendation) - cache--latest and popular items-->fm_predict + cache--latest items-->fm_predict fm_predict--recommendation-->cache2[(Cache)] subgraph Worker Node user_based--recommendation-->fm_predict @@ -41,7 +41,7 @@ flowchart TD ## Architecture -The master node loads data from the database. In the process of loading data, popular items and the latest items are written to the cache. Then, the master node searches for neighbors and training recommendation models. In the background, the random search is used to find the optimal recommendation model for current data. The worker nodes pull recommendation models from the master node and generate recommendations for each user. The server nodes provide RESTful APIs. Workers and servers connect to the master node via GRPC, which is configured in the configuration file. +The master node loads data from the database. In the process of loading data, the latest items are written to the cache. Then, the master node searches for neighbors and training recommendation models. In the background, the random search is used to find the optimal recommendation model for current data. The worker nodes pull recommendation models from the master node and generate recommendations for each user. The server nodes provide RESTful APIs. Workers and servers connect to the master node via GRPC, which is configured in the configuration file. ```toml [master] @@ -76,7 +76,7 @@ The intermediate cache is configurable. Increasing cache size might improve reco ```toml [recommend] -# The cache size for recommended/popular/latest items. The default value is 10. +# The cache size for recommended/latest items. The default value is 10. cache_size = 100 # Recommended cache expire time. The default value is 72h. @@ -87,7 +87,7 @@ The recommendation flow will be introduced in the top-down method. ### Master: Neighbors and Models -The master node is driven by data loading. Data loading happens in every `model_fit_period`. The latest items and popular items can be collected during loading data. Once data is loaded, the following tasks start. +The master node is driven by data loading. Data loading happens in every `model_fit_period`. The latest items can be collected during loading data. Once data is loaded, the following tasks start. - **Find Neighbors:** User neighbors and item neighbors are found and cached. - **Fit MF and FM** The matrix factorization model and factorization machine model are trained and delivered to workers. @@ -138,7 +138,7 @@ Workers nodes generate and write offline recommendations to the cache database. ```mermaid flowchart TD - cache[(Cache)]--"latest items\n{{if enable_latest_recommend }}\n\npopular items\n{{ if enable_popular_recommend }}"-->concat + cache[(Cache)]--"latest items\n{{if enable_latest_recommend }}"-->concat cache--user neighbors-->user_based["User Similarity-based Recommendation\n{{ if enable_user_based_recommend }}"] cache--item neighbors-->item_based["Item Similarity-based Recommendation\n{{ if enable_item_based_recommend }}"] user_based--recommendation-->concat @@ -149,11 +149,11 @@ flowchart TD fm--recommendation-->remove[Remove\nRead Items] database2[(Database)]--feedback-->remove remove--recommendation-->explore[Explore\nRecommendation] - cache2[(Cache)]--latest and popular items-->explore + cache2[(Cache)]--latest items-->explore explore--recommendation-->cache3[(Cache)] ``` -First, the worker collects candidates from the latest items, popular items, user similarity-based recommendations, item similarity-based recommendations and matrix factorization recommendations. Sources of candidates can be enabled or disabled in the configuration. Then, candidates are ranked by the factorization machine and read items are removed. If `enable_click_through_prediction` is `false`, candidates are ranked randomly. Finally, popular items and the latest items will be injected into recommendations with probabilities defined in `explore_recommend`. Offline recommendation results will be written to the cache. +First, the worker collects candidates from the latest items, user similarity-based recommendations, item similarity-based recommendations and matrix factorization recommendations. Sources of candidates can be enabled or disabled in the configuration. Then, candidates are ranked by the factorization machine and read items are removed. If `enable_click_through_prediction` is `false`, candidates are ranked randomly. Finally, the latest items will be injected into recommendations with probabilities defined in `explore_recommend`. Offline recommendation results will be written to the cache. ```toml [recommend.offline] @@ -167,9 +167,6 @@ refresh_recommend_period = "24h" # Enable latest recommendation during offline recommendation. The default value is false. enable_latest_recommend = true -# Enable popular recommendation during offline recommendation. The default value is false. -enable_popular_recommend = false - # Enable user-based similarity recommendation during offline recommendation. The default value is false. enable_user_based_recommend = true @@ -183,11 +180,10 @@ enable_collaborative_recommend = true # would be merged randomly. The default value is false. enable_click_through_prediction = true -# The explore recommendation method is used to inject popular items or latest items into recommended result: -# popular: Recommend popular items to cold-start users. +# The explore recommendation method is used to inject latest items into recommended result: # latest: Recommend latest items to cold-start users. -# The default values is { popular = 0.0, latest = 0.0 }. -explore_recommend = { popular = 0.1, latest = 0.2 } +# The default values is { latest = 0.0 }. +explore_recommend = { latest = 0.2 } ``` ### Server: Online Recommendation @@ -210,7 +206,7 @@ auto_insert_item = true #### Recommendation APIs -Recommendation APIs return recommendation results. For non-personalized recommendations (latest items, popular items or neighbors), the server node fetches cached recommendations from the cache database and sends responses. But the server node needs to do more work for personalized recommendations. +Recommendation APIs return recommendation results. For non-personalized recommendations (latest items or neighbors), the server node fetches cached recommendations from the cache database and sends responses. But the server node needs to do more work for personalized recommendations. - **Recommendation:** Offline recommendations by workers are written to responses and read items will be removed. But if the offline recommendation cache is consumed, fallback recommenders will be used. Recommenders in `fallback_recommend` will be tried in order. @@ -244,7 +240,6 @@ flowchart LR # The fallback recommendation method is used when cached recommendation drained out: # item_based: Recommend similar items. -# popular: Recommend popular items. # latest: Recommend latest items. # Recommenders are used in order. The default values is ["latest"]. fallback_recommend = ["item_based", "latest"] @@ -256,7 +251,7 @@ num_feedback_fallback_item_based = 10 Besides recommendations, there are two important configurations for servers. - **Clock Error:** Gorse supports feedback with future timestamps, thus Gorse relies on a correct clock. However, clocks in different hosts might be different, `clock_error` should be the maximal difference between clocks. -- **Cache Expiration:** Servers cache hidden items and popular items in the local cache to avoid accessing the external database too frequently. The local cache is refreshed every `cache_expire`. +- **Cache Expiration:** Servers cache hidden items in the local cache to avoid accessing the external database too frequently. The local cache is refreshed every `cache_expire`. ```toml [server] diff --git a/src/docs/master/concepts/non-personalized.md b/src/docs/master/concepts/non-personalized.md index ffefcdb..2fa2920 100644 --- a/src/docs/master/concepts/non-personalized.md +++ b/src/docs/master/concepts/non-personalized.md @@ -4,7 +4,7 @@ shortTitle: Non-personalized --- # Non-personalized Recommenders -Gorse recommender system offers two non-personalized recommenders: the latest recommender and the popular recommender. However, they are not flexible enough. To improve the flexibility of non-personalized recommendations, Gorse provides a new implementation of non-personalized recommenders. +Gorse recommender system offers a non-personalized recommender: the latest recommender. However, it is not flexible enough. To improve the flexibility of non-personalized recommendations, Gorse provides a new implementation of non-personalized recommenders. ## Configuration diff --git a/src/docs/master/config.md b/src/docs/master/config.md index c3e9b37..38cbd2d 100644 --- a/src/docs/master/config.md +++ b/src/docs/master/config.md @@ -122,12 +122,6 @@ Document: https://github.com/mailru/go-clickhouse#dsn | `positive_feedback_ttl` | string | `0` | [Time-to-live of positive feedback](./concepts/data-objects#time-to-live-1) | | `item_ttl` | string | `0` | [Time-to-live of items](./concepts/data-objects#time-to-live) | -### `recommend.popular` - -| Key | Type | Default | Description | -| --- | --- | --- | --- | -| `popular_window` | integer | `4320h` | [Time window of popular items in days](./concepts/algorithms#popular-items) | - ### `recommend.user_neighbors` | Key | Type | Default | Description | @@ -174,12 +168,11 @@ Document: https://github.com/mailru/go-clickhouse#dsn | `check_recommend_period` | integer | `1m` | [Period to check recommendation for users](./concepts/how-it-works#worker-offline-recommendation) | | `refresh_recommend_period` | integer | `24h` | [Period to refresh offline recommendation cache](./concepts/how-it-works#worker-offline-recommendation) | | `enable_latest_recommend` | boolean | `false` | [Enable latest recommendation during offline recommendation](./concepts/how-it-works.html#worker-offline-recommendation) | -| `enable_popular_recommend` | boolean | `false` | [Enable popular recommendation during offline recommendation](./concepts/how-it-works.html#worker-offline-recommendation) | | `enable_user_based_recommend` | boolean | `false` | [Enable user-based similarity recommendation during offline recommendation](./concepts/how-it-works.html#worker-offline-recommendation) | | `enable_item_based_recommend` | boolean | `false` | [Enable item-based similarity recommendation during offline recommendation](./concepts/how-it-works.html#worker-offline-recommendation) | | `enable_collaborative_recommend` | boolean | `true` | [Enable collaborative filtering recommendation during offline recommendation](./concepts/how-it-works.html#worker-offline-recommendation) | | `enable_click_through_prediction` | boolean | `false` | [Enable click-though rate prediction during offline recommendation. Otherwise, results from multi-way recommendation would be merged randomly](./concepts/how-it-works.html#worker-offline-recommendation) | -| `explore_recommend` | map | `{ popular = 0.0, latest = 0.0 }` | [The explore recommendation method is used to inject popular items or latest items into recommended result](./concepts/how-it-works.html#worker-offline-recommendation) | +| `explore_recommend` | map | `{ latest = 0.0 }` | [The explore recommendation method is used to inject latest items into recommended result](./concepts/how-it-works.html#worker-offline-recommendation) | ### `recommend.online` diff --git a/src/zh/docs/master/api/apidocs.md b/src/zh/docs/master/api/apidocs.md index f72bf7b..3e89e88 100644 --- a/src/zh/docs/master/api/apidocs.md +++ b/src/zh/docs/master/api/apidocs.md @@ -1169,73 +1169,6 @@ Get the latest items in category. ::: -::: details GET /api/popular - -Get popular items. - -#### Parameters - -| Name | Locate | Type | Description | Required | -|-|-|-|-|-| -| `n` | query | integer | Number of returned recommendations | | -| `offset` | query | integer | Offset of returned recommendations | | -| `user-id` | query | string | Remove read items of a user | | - -#### Response Body - -```json -[ - { - "Id": "crocodilia", - "Score": 3.1415926 - }, - { - "Id": "crocodilia", - "Score": 3.1415926 - }, - { - "Id": "crocodilia", - "Score": 3.1415926 - } -] -``` - -::: - -::: details GET /api/popular/{category} - -Get popular items in category. - -#### Parameters - -| Name | Locate | Type | Description | Required | -|-|-|-|-|-| -| `category` | path | string | Category of returned items. | ✅ | -| `n` | query | integer | Number of returned items | | -| `offset` | query | integer | Offset of returned items | | -| `user-id` | query | string | Remove read items of a user | | - -#### Response Body - -```json -[ - { - "Id": "crocodilia", - "Score": 3.1415926 - }, - { - "Id": "crocodilia", - "Score": 3.1415926 - }, - { - "Id": "crocodilia", - "Score": 3.1415926 - } -] -``` - -::: - ::: details GET /api/recommend/{user-id} Get recommendation for user. diff --git a/src/zh/docs/master/concepts/algorithms.md b/src/zh/docs/master/concepts/algorithms.md index 3daa3c4..7348c09 100644 --- a/src/zh/docs/master/concepts/algorithms.md +++ b/src/zh/docs/master/concepts/algorithms.md @@ -33,7 +33,7 @@ $\mathbb{I}(p)$ | 如果条件$p$满足则等于1,否则等于0 ```toml [recommend] -# The cache size for recommended/popular/latest items. The default value is 100. +# The cache size for recommended/latest items. The default value is 100. cache_size = 100 ``` @@ -53,32 +53,6 @@ cache_size = 100 select item_id from items order by time_stamp desc limit ; ``` -### 人气物品推荐 - -许多网站向用户显示最近的热门,如Twitter的趋势。流行物品的推荐相当于以下SQL: - -```sql -select item_id from ( - select item_id, count(_) as feedback_count from feedback - where feedback_type in - and time_stamp >= NOW() - INTERVAL - group by item_id) t -order by feedback_count desc limit ; -``` - -::: tip - -配置文件中的` `对应的是热门物品的窗口。 - -```toml -[recommend.popular] - -# The time window of popular items. The default values is 4320h. -popular_window = "720h" -``` - -::: - ## 相似算法 在很多情况下,用户喜欢特定类型的物品,例如解密游戏玩家喜欢解谜游戏、B站的年轻小伙子喜欢看小姐姐跳舞。 diff --git a/src/zh/docs/master/concepts/data-objects.md b/src/zh/docs/master/concepts/data-objects.md index b755d25..4a3f6c3 100644 --- a/src/zh/docs/master/concepts/data-objects.md +++ b/src/zh/docs/master/concepts/data-objects.md @@ -73,8 +73,6 @@ item_ttl = 0 --- | --- | --- `GET` | `/api/latest` | 获取最新的物品。 `GET` | `/api/latest/{category}` | 获取指定品类中的最新物品。 -`GET` | `/api/popular` | 获取热门物品。 -`GET` | `/api/popular/{category}` | 获取指定品类中的热门物品。 `GET` | `/api/recommend/{user-id}` | 获取用户推荐。 `GET` | `/api/recommend/{user-id}/{category}` | 获取指定品类下的用户推荐。 `GET` | `/api/item/{item-id}/neighbors` | 获取物品的相似物品。 diff --git a/src/zh/docs/master/concepts/how-it-works.md b/src/zh/docs/master/concepts/how-it-works.md index 83137ff..03f12b3 100644 --- a/src/zh/docs/master/concepts/how-it-works.md +++ b/src/zh/docs/master/concepts/how-it-works.md @@ -77,7 +77,7 @@ Gorse 像瀑布一样工作。用户、物品和反馈是水的源头。中间 ```toml [recommend] -# The cache size for recommended/popular/latest items. The default value is 10. +# The cache size for recommended/latest items. The default value is 10. cache_size = 100 # Recommended cache expire time. The default value is 72h. @@ -139,7 +139,7 @@ flowchart LR ```mermaid flowchart TD - cache[(缓存)]--"最新物品\n{{if enable_latest_recommend }}\n\n热门物品\n{{ if enable_popular_recommend }}"-->concat + cache[(缓存)]--"最新物品\n{{if enable_latest_recommend }}"-->concat cache--相似用户-->user_based["基于相似用户的推荐\n{{ if enable_user_based_recommend }}"] cache--相似物品-->item_based["基于相似物品的推荐\n{{ if enable_item_based_recommend }}"] user_based--推荐物品-->concat @@ -150,11 +150,11 @@ flowchart TD fm--推荐物品-->remove[移除已读物品] database2[(数据库)]--反馈-->remove remove--推荐物品-->explore[探索推荐] - cache2[(缓存)]--最新物品和热门物品-->explore + cache2[(缓存)]--最新物品-->explore explore--推荐物品-->cache3[(缓存)] ``` -首先,工作节点从最新物品、热门物品、基于用户相似性的推荐、基于物品相似性的推荐和矩阵分解推荐中收集候选物品。候选物品的来源可以在配置中启用或禁用。然后,通过因子分解机对候选物品进行排名,并删除已读物品。如果`enable_click_through_prediction`是`false`,则候选物品会被随机排序。最后,热门的物品和最新的物品将以`explore_recommend`中定义的概率被注入到推荐中。离线推荐结果将被写入到缓存。 +首先,工作节点从最新物品、基于用户相似性的推荐、基于物品相似性的推荐和矩阵分解推荐中收集候选物品。候选物品的来源可以在配置中启用或禁用。然后,通过因子分解机对候选物品进行排名,并删除已读物品。如果`enable_click_through_prediction`是`false`,则候选物品会被随机排序。最后,最新的物品将以`explore_recommend`中定义的概率被注入到推荐中。离线推荐结果将被写入到缓存。 ```toml [recommend.offline] @@ -168,9 +168,6 @@ refresh_recommend_period = "24h" # Enable latest recommendation during offline recommendation. The default value is false. enable_latest_recommend = true -# Enable popular recommendation during offline recommendation. The default value is false. -enable_popular_recommend = false - # Enable user-based similarity recommendation during offline recommendation. The default value is false. enable_user_based_recommend = true @@ -184,11 +181,10 @@ enable_collaborative_recommend = true # would be merged randomly. The default value is false. enable_click_through_prediction = true -# The explore recommendation method is used to inject popular items or latest items into recommended result: -# popular: Recommend popular items to cold-start users. +# The explore recommendation method is used to inject latest items into recommended result: # latest: Recommend latest items to cold-start users. -# The default values is { popular = 0.0, latest = 0.0 }. -explore_recommend = { popular = 0.1, latest = 0.2 } +# The default values is { latest = 0.0 }. +explore_recommend = { latest = 0.2 } ``` ### 服务节点:在线推荐 @@ -211,7 +207,7 @@ auto_insert_item = true #### 推荐API -推荐 API 用于返回推荐结果。对于非个性化推荐(最新项目、热门物、相似用户和相似物品),服务器节点从缓存数据库中获取推荐然后发送响应。但是对于个性化推荐,服务节点需要做更多的工作。 +推荐 API 用于返回推荐结果。对于非个性化推荐(最新项目、相似用户和相似物品),服务器节点从缓存数据库中获取推荐然后发送响应。但是对于个性化推荐,服务节点需要做更多的工作。 - **个性化推荐:** 首先拉取工作节点产生的离线推荐,然后将已读物品删除。但如果离线推荐缓存被消耗完了,将使用兜底推荐算法。也就是从前往后尝试`fallback_recommend`中的推荐算法。 @@ -245,7 +241,6 @@ flowchart LR # The fallback recommendation method is used when cached recommendation drained out: # item_based: Recommend similar items. -# popular: Recommend popular items. # latest: Recommend latest items. # Recommenders are used in order. The default values is ["latest"]. fallback_recommend = ["item_based", "latest"] diff --git a/src/zh/docs/master/config.md b/src/zh/docs/master/config.md index 6ffb4a2..485c199 100644 --- a/src/zh/docs/master/config.md +++ b/src/zh/docs/master/config.md @@ -124,12 +124,6 @@ chhttps://user:password@host[:port]/database?param1=value1&...¶mN=valueN `positive_feedback_ttl` | 字符串 | `0` | [正反馈的有效时间](./concepts/data-objects#time-to-live-1) `item_ttl` | 字符串 | `0` | [物品的有效时间](./concepts/data-objects#time-to-live) -### `recommend.popular` - -配置项 | 类型 | 默认值 | 描述 ---- | --- | --- | --- -`popular_window` | 整型 | `4320h` | [以天为单位的热门物品的时间窗口](./concepts/algorithms#popular-items) - ### `recommend.user_neighbors` 配置项 | 类型 | 默认值 | 描述 @@ -176,12 +170,11 @@ chhttps://user:password@host[:port]/database?param1=value1&...¶mN=valueN `check_recommend_period` | 整型 | `1m` | [触发离线推荐的周期](./concepts/how-it-works#worker-offline-recommendation) `refresh_recommend_period` | 整型 | `24h` | [强制刷新离线推荐的周期](./concepts/how-it-works#worker-offline-recommendation) `enable_latest_recommend` | 布尔值 | `false` | [离线推荐时启用最新推荐](./concepts/how-it-works.html#worker-offline-recommendation) -`enable_popular_recommend` | 布尔值 | `false` | [离线推荐时开启热门推荐](./concepts/how-it-works.html#worker-offline-recommendation) `enable_user_based_recommend` | 布尔值 | `false` | [在离线推荐期间启用基于相似用户的推荐](./concepts/how-it-works.html#worker-offline-recommendation) `enable_item_based_recommend` | 布尔值 | `false` | [在离线推荐期间启用基于相似物品的推荐](./concepts/how-it-works.html#worker-offline-recommendation) `enable_collaborative_recommend` | 布尔值 | `true` | [离线推荐时启用协同过滤推荐](./concepts/how-it-works.html#worker-offline-recommendation) `enable_click_through_prediction` | 布尔值 | `false` | [在离线推荐期间启用点击率预测。否则,多路推荐的结果将被随机合并](./concepts/how-it-works.html#worker-offline-recommendation) -`explore_recommend` | 字段 | `{ popular = 0.0, latest = 0.0 }` | [在探索推荐阶段,将热门物品或最新物品注入推荐结果的比例](./concepts/how-it-works.html#worker-offline-recommendation) +`explore_recommend` | 字段 | `{ latest = 0.0 }` | [在探索推荐阶段,将最新物品注入推荐结果的比例](./concepts/how-it-works.html#worker-offline-recommendation) ### `recommend.online`