From e657a09661cadf16c93e8dd19bf8c10ba24f9946 Mon Sep 17 00:00:00 2001 From: cclauss Date: Thu, 30 May 2019 20:21:40 +0200 Subject: [PATCH] RandSelectNegativeSample() --> RandSelectNegativeSamples() The function is defined as singular on line 5 but it returns multiple samples and is called a plural on line 23. This PR suggest using the plural form in both places. Discovered using the tests that were suppressed in https://github.com/apachecn/AiLearning/commit/4e129cdf43e519fb05a6b0c7cb73ef1830f2a11b#commitcomment-33663962 --- src/py3.x/16.RecommenderSystems/test_lfm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/py3.x/16.RecommenderSystems/test_lfm.py b/src/py3.x/16.RecommenderSystems/test_lfm.py index f3a7d0e96..2d6193553 100644 --- a/src/py3.x/16.RecommenderSystems/test_lfm.py +++ b/src/py3.x/16.RecommenderSystems/test_lfm.py @@ -2,7 +2,7 @@ # 负样本采样过程 -def RandomSelectNegativeSample(self, items): +def RandSelectNegativeSamples(self, items): ret = {key: 1 for key in items} n = 0 for i in range(0, len(items) * 3):