eps 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d56573908e892d8d1959d66c7b6f2940f8930a2d0f2dfd5d4da75e2ff7cfdb63
4
- data.tar.gz: 9eaf1a06c8c51ba15d9b4468796fc869f2933945494d027b54789304080c5d5b
3
+ metadata.gz: bf9b15abb922ed62bace8127413e9353d37364f7fe63218088278420655a2561
4
+ data.tar.gz: 9ae7077f18295a24daf682777106807eec96dfa75e6e4a9f6b595cb52981aec5
5
5
  SHA512:
6
- metadata.gz: 971dbd2a95a280ed50925df68a29018ba7b3bccb7094b1374923a8ce7d100720202245843e003b26447832e9c1f8285bafcc7692020f5971a56c0a8e89a12afb
7
- data.tar.gz: de06585dc75608b0f8c62188cce351987a0cd53f3b12889d4d63de28ed81ae1b143e31f47ac8c53083eeb250e18c5f8b721fff94a378e14203fd8fa90ba3e440
6
+ metadata.gz: d37cec29c949a729f9581532902b595f4fca1817054243e7e6261b5167917144ba988bbea5fe2a069ef4b988f91fa2b5fd0ea5628059c328b4575d374eb952d7
7
+ data.tar.gz: 667afb1f383c0d2a8c45c281b7a2b88cc76c3b691704853feb03a8be5a95bfa3ba155ba3e82278c5993b638185c80a82fbbe852f5704ab6bed896af667dd3b76
@@ -1,3 +1,7 @@
1
+ ## 0.3.7 (2020-11-23)
2
+
3
+ - Fixed error with LightGBM summary
4
+
1
5
  ## 0.3.6 (2020-06-19)
2
6
 
3
7
  - Fixed error with text features for LightGBM
data/README.md CHANGED
@@ -7,7 +7,7 @@ Machine learning for Ruby
7
7
 
8
8
  Check out [this post](https://ankane.org/rails-meet-data-science) for more info on machine learning with Rails
9
9
 
10
- [![Build Status](https://travis-ci.org/ankane/eps.svg?branch=master)](https://travis-ci.org/ankane/eps)
10
+ [![Build Status](https://github.com/ankane/eps/workflows/build/badge.svg?branch=master)](https://github.com/ankane/eps/actions)
11
11
 
12
12
  ## Installation
13
13
 
@@ -134,7 +134,7 @@ For text features, use strings with multiple words.
134
134
  {description: "a beautiful house on top of a hill"}
135
135
  ```
136
136
 
137
- This creates features based on word count (term frequency).
137
+ This creates features based on [word count](https://en.wikipedia.org/wiki/Bag-of-words_model).
138
138
 
139
139
  You can specify text features explicitly with:
140
140
 
@@ -147,12 +147,12 @@ You can set advanced options with:
147
147
  ```ruby
148
148
  text_features: {
149
149
  description: {
150
- min_occurences: 5,
151
- max_features: 1000,
152
- min_length: 1,
153
- case_sensitive: true,
154
- tokenizer: /\s+/,
155
- stop_words: ["and", "the"]
150
+ min_occurences: 5, # min times a word must appear to be included in the model
151
+ max_features: 1000, # max number of words to include in the model
152
+ min_length: 1, # min length of words to be included
153
+ case_sensitive: true, # how to treat words with different case
154
+ tokenizer: /\s+/, # how to tokenize the text, defaults to whitespace
155
+ stop_words: ["and", "the"] # words to exclude from the model
156
156
  }
157
157
  }
158
158
  ```
@@ -218,7 +218,7 @@ Build the model with:
218
218
  PriceModel.build
219
219
  ```
220
220
 
221
- This saves the model to `price_model.pmml`. Be sure to check this into source control.
221
+ This saves the model to `price_model.pmml`. Check this into source control or use a tool like [Trove](https://github.com/ankane/trove) to store it.
222
222
 
223
223
  Predict with:
224
224
 
@@ -10,7 +10,7 @@ module Eps
10
10
  str << "Model needs more data for better predictions\n"
11
11
  else
12
12
  str << "Most important features\n"
13
- @importance_keys.zip(importance).sort_by { |k, v| [-v, k] }.first(10).each do |k, v|
13
+ @importance_keys.zip(importance).sort_by { |k, v| [-v, display_field(k)] }.first(10).each do |k, v|
14
14
  str << "#{display_field(k)}: #{(100 * v / total).round}\n"
15
15
  end
16
16
  end
@@ -1,3 +1,3 @@
1
1
  module Eps
2
- VERSION = "0.3.6"
2
+ VERSION = "0.3.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
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-06-19 00:00:00.000000000 Z
11
+ date: 2020-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lightgbm
@@ -122,7 +122,7 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
- description:
125
+ description:
126
126
  email: andrew@chartkick.com
127
127
  executables: []
128
128
  extensions: []
@@ -156,7 +156,7 @@ homepage: https://github.com/ankane/eps
156
156
  licenses:
157
157
  - MIT
158
158
  metadata: {}
159
- post_install_message:
159
+ post_install_message:
160
160
  rdoc_options: []
161
161
  require_paths:
162
162
  - lib
@@ -171,8 +171,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
171
  - !ruby/object:Gem::Version
172
172
  version: '0'
173
173
  requirements: []
174
- rubygems_version: 3.1.2
175
- signing_key:
174
+ rubygems_version: 3.1.4
175
+ signing_key:
176
176
  specification_version: 4
177
177
  summary: Machine learning for Ruby. Supports regression (linear regression) and classification
178
178
  (naive Bayes)