vowpalwabbit 0.2.0 → 0.3.0

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: 4dd1b21080c412dc2e9571f7728cd71396f203e85fbc8790b8993ba01414a14d
4
- data.tar.gz: 5435815694fa67e2659b72cbc3ceef6c928b89f4f5975754e981899d443f3928
3
+ metadata.gz: 75746e7efe8fd978814c5b22deff8bb496e45f43dbc05e23d54b120396fd271c
4
+ data.tar.gz: 8d69b63c36598da996bdd9753ea7b693cedc709da0fb35603e24ad7ecd60d0ba
5
5
  SHA512:
6
- metadata.gz: 2c0b2950c6ef4f6b185a26198e540f647dc643d0f8e95f751b21cd4d6a157a0ba6216be710d2efb1cf715c74832121c18fcc655ca4462263ff03d1a7bcb02c64
7
- data.tar.gz: 54681fcfe2e715576193317949c8e5c78a0e610026fd52e2547eab4873b4966f61b0fa0ae3822445d24248e0e89ef655e9ad7507da2b722862c59336ae028f6f
6
+ metadata.gz: 6b82a3d0f584466db539656c2e987fe40721b5cb9e7a6c10d4fcd3ff5350475a4d4d22ce0192efe15f6737a8d5526de61c5a85ff142eea31b32ec7129302371e
7
+ data.tar.gz: eab978e6734ff3e53f48ad8beb3435ef74c24e1c8615c9ec10863fc03e3b33e0dbf88a673cc578dc1f8b7389f84d7e21528625dd9188cd35b38ad2b5f586f8a3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.3.0 (2024-10-23)
2
+
3
+ - Dropped support for Ruby < 3.1
4
+
1
5
  ## 0.2.0 (2022-09-02)
2
6
 
3
7
  - Prefer `save` over `save_model`
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [Vowpal Wabbit](https://vowpalwabbit.org) - fast online machine learning - for Ruby
4
4
 
5
- [![Build Status](https://github.com/ankane/vowpalwabbit-ruby/workflows/build/badge.svg?branch=master)](https://github.com/ankane/vowpalwabbit-ruby/actions)
5
+ [![Build Status](https://github.com/ankane/vowpalwabbit-ruby/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/vowpalwabbit-ruby/actions)
6
6
 
7
7
  ## Installation
8
8
 
@@ -12,7 +12,7 @@ module VowpalWabbit
12
12
  def score(x, y = nil)
13
13
  y_pred, y = predict_for_score(x, y)
14
14
  y_pred.map! { |v| v >= 0 ? 1 : -1 }
15
- y_pred.zip(y).select { |yp, yt| yp == yt }.count / y.count.to_f
15
+ y_pred.zip(y).count { |yp, yt| yp == yt } / y.count.to_f
16
16
  end
17
17
  end
18
18
  end
@@ -9,7 +9,7 @@ module VowpalWabbit
9
9
  raise LoadError, "Could not find Vowpal Wabbit"
10
10
  end
11
11
 
12
- # https://github.com/VowpalWabbit/vowpal_wabbit/blob/master/vowpalwabbit/vwdll.h
12
+ # https://github.com/VowpalWabbit/vowpal_wabbit/blob/master/vowpalwabbit/c_wrapper/include/vw/c_wrapper/vwdll.h
13
13
  # keep same order
14
14
 
15
15
  attach_function :VW_InitializeA, %i[string], :pointer
@@ -89,7 +89,7 @@ module VowpalWabbit
89
89
  end
90
90
 
91
91
  def check_param(v)
92
- raise ArgumentError, "Invalid parameter" if /[[:space:]]/.match(v)
92
+ raise ArgumentError, "Invalid parameter" if /[[:space:]]/.match?(v)
93
93
  end
94
94
 
95
95
  def predict_example(example)
@@ -1,3 +1,3 @@
1
1
  module VowpalWabbit
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
data/lib/vowpalwabbit.rb CHANGED
@@ -2,10 +2,10 @@
2
2
  require "ffi"
3
3
 
4
4
  # modules
5
- require "vowpalwabbit/model"
6
- require "vowpalwabbit/classifier"
7
- require "vowpalwabbit/regressor"
8
- require "vowpalwabbit/version"
5
+ require_relative "vowpalwabbit/model"
6
+ require_relative "vowpalwabbit/classifier"
7
+ require_relative "vowpalwabbit/regressor"
8
+ require_relative "vowpalwabbit/version"
9
9
 
10
10
  module VowpalWabbit
11
11
  class Error < StandardError; end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vowpalwabbit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-02 00:00:00.000000000 Z
11
+ date: 2024-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -51,14 +51,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '2.7'
54
+ version: '3.1'
55
55
  required_rubygems_version: !ruby/object:Gem::Requirement
56
56
  requirements:
57
57
  - - ">="
58
58
  - !ruby/object:Gem::Version
59
59
  version: '0'
60
60
  requirements: []
61
- rubygems_version: 3.3.7
61
+ rubygems_version: 3.5.16
62
62
  signing_key:
63
63
  specification_version: 4
64
64
  summary: Fast online machine learning for Ruby