disco 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96836166496bb14ec8f973fb5e3709e0a28b7d5d8678608d074c0d7613076cc2
4
- data.tar.gz: c68d12941fddc51a67938ef951be4ee809faef2e131de0f5856908d8ed1f93d9
3
+ metadata.gz: 1ed4e5ff1d50d49068cfc9dc6b26df6be24aca1827b3f3724c3e351b06d768ac
4
+ data.tar.gz: 24756addf552956497889a9898eb9f93cdeec996c2a8a3cc1808c61425ea3d39
5
5
  SHA512:
6
- metadata.gz: 8b960dc961ead701713dbc7f9c104852355ac6d61f9f1f6e1cde43d1d4fa257b2c55859ca42896a6780f006d25f5ff613bf0261e601033db7d3c063f2a9f3d3e
7
- data.tar.gz: 6c82413ce53a9100fc97f9a3849c6231ebee4945fd26a3e3a1150f8c3abcca915032d35f4373b83217fa786600181097c003d1d071aab9de00612baf4c4eaa99
6
+ metadata.gz: 50d5a9ba262c8c751f77fb2037235d9186e7616af55c653518752b2300d0c0b1a70d59dd935f0eaed9e1bd09881e547c66446dd0af8bfe641a679acae76fddd0
7
+ data.tar.gz: 00b260249dbc2831ad4948d531176c53df965b28f317b0e46987c5be7209da63126033cf75116b01f78ceefd8da977a9fb14bf014e67ae71e18bb634a9852335
@@ -1,3 +1,7 @@
1
+ ## 0.2.1 (2020-10-28)
2
+
3
+ - Fixed issue with `user_recs` returning rated items
4
+
1
5
  ## 0.2.0 (2020-07-31)
2
6
 
3
7
  - Changed score to always be between -1 and 1 for `item_recs` and `similar_users` (cosine similarity - this makes it easier to understand and consistent with `optimize_item_recs` and `optimize_similar_users`)
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Disco
2
2
 
3
- :fire: Collaborative filtering for Ruby
3
+ :fire: Recommendations for Ruby and Rails using collaborative filtering
4
4
 
5
5
  - Supports user-based and item-based recommendations
6
6
  - Works with explicit and implicit feedback
@@ -101,7 +101,8 @@ recommender.item_recs("Star Wars (1977)")
101
101
  ```ruby
102
102
  views = Ahoy::Event.
103
103
  where(name: "Viewed post").
104
- group(:user_id, "properties->>'post_id'"). # postgres syntax
104
+ group(:user_id).
105
+ group("properties->>'post_id'"). # postgres syntax
105
106
  count
106
107
 
107
108
  data =
@@ -315,3 +316,12 @@ Everyone is encouraged to help improve this project. Here are a few ways you can
315
316
  - Fix bugs and [submit pull requests](https://github.com/ankane/disco/pulls)
316
317
  - Write, clarify, or fix documentation
317
318
  - Suggest or add new features
319
+
320
+ To get started with development:
321
+
322
+ ```sh
323
+ git clone https://github.com/ankane/disco.git
324
+ cd disco
325
+ bundle install
326
+ bundle exec rake test
327
+ ```
@@ -87,7 +87,7 @@ module Disco
87
87
  idx = item_ids.map { |i| @item_map[i] }.compact
88
88
  predictions.values_at(*idx)
89
89
  else
90
- @rated[u].keys.each do |i|
90
+ @rated[u].keys.sort_by { |v| -v }.each do |i|
91
91
  predictions.delete_at(i)
92
92
  end
93
93
  end
@@ -1,3 +1,3 @@
1
1
  module Disco
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: disco
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-31 00:00:00.000000000 Z
11
+ date: 2020-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: libmf
@@ -150,7 +150,7 @@ dependencies:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: 0.3.0
153
- description:
153
+ description:
154
154
  email: andrew@chartkick.com
155
155
  executables: []
156
156
  extensions: []
@@ -172,7 +172,7 @@ homepage: https://github.com/ankane/disco
172
172
  licenses:
173
173
  - MIT
174
174
  metadata: {}
175
- post_install_message:
175
+ post_install_message:
176
176
  rdoc_options: []
177
177
  require_paths:
178
178
  - lib
@@ -187,8 +187,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
187
187
  - !ruby/object:Gem::Version
188
188
  version: '0'
189
189
  requirements: []
190
- rubygems_version: 3.1.2
191
- signing_key:
190
+ rubygems_version: 3.1.4
191
+ signing_key:
192
192
  specification_version: 4
193
- summary: Collaborative filtering for Ruby
193
+ summary: Recommendations for Ruby and Rails using collaborative filtering
194
194
  test_files: []