numo-liblinear 1.1.2 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +3 -2
- data/CHANGELOG.md +3 -0
- data/Gemfile +7 -0
- data/README.md +1 -1
- data/Steepfile +20 -0
- data/lib/numo/liblinear/version.rb +1 -1
- data/numo-liblinear.gemspec +0 -5
- data/sig/numo/liblinear.rbs +52 -0
- data/sig/patch.rbs +8 -0
- metadata +9 -62
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c7b3a307060c75a2b5580fdf89083fd8dccd1423b8ad9d615d5546d21c6f437
|
4
|
+
data.tar.gz: 86d810729c58f5725f6ce3cfb7cd56d6b65218071754802649b28bfe06dfbb10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8ddcafa60ffa41c891312c470a44661cec27d5ed8cdbb9bb9efb7a0989e2399176ae37f5f645f0bc3911906fd29e790638d56b7234a59b8345af5005fa7c931
|
7
|
+
data.tar.gz: 27ebaf6df54989ba885dfce945aeee8e77fbbe29eef756e42b3ed3db9de0147ecc1cbdb36d572d9f9dceb406e5dac5b42302c7a96713d6dd14351673319a44d6
|
data/.github/workflows/build.yml
CHANGED
@@ -6,8 +6,9 @@ jobs:
|
|
6
6
|
build:
|
7
7
|
runs-on: ubuntu-latest
|
8
8
|
strategy:
|
9
|
+
fail-fast: false
|
9
10
|
matrix:
|
10
|
-
ruby: [ '2.
|
11
|
+
ruby: [ '2.6', '2.7', '3.0' ]
|
11
12
|
steps:
|
12
13
|
- uses: actions/checkout@v2
|
13
14
|
- name: Checkout submodule
|
@@ -22,6 +23,6 @@ jobs:
|
|
22
23
|
ruby-version: ${{ matrix.ruby }}
|
23
24
|
- name: Build and test with Rake
|
24
25
|
run: |
|
25
|
-
gem install bundler
|
26
|
+
gem install --no-document bundler
|
26
27
|
bundle install --jobs 4 --retry 3
|
27
28
|
bundle exec rake
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -148,7 +148,7 @@ Accuracy: 87.9 %
|
|
148
148
|
## Note
|
149
149
|
The hyperparemter of LIBLINEAR is given with Ruby Hash on Numo::Liblinear.
|
150
150
|
The hash key of hyperparameter and its meaning match the struct parameter of LIBLINEAR.
|
151
|
-
The parameter is detailed in [LIBLINEAR README](https://github.com/cjlin1/liblinear/blob/
|
151
|
+
The parameter is detailed in [LIBLINEAR README](https://github.com/cjlin1/liblinear/blob/master/README)
|
152
152
|
|
153
153
|
```ruby
|
154
154
|
param = {
|
data/Steepfile
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
target :lib do
|
2
|
+
signature "sig"
|
3
|
+
#
|
4
|
+
check "lib" # Directory name
|
5
|
+
# check "Gemfile" # File name
|
6
|
+
# check "app/models/**/*.rb" # Glob
|
7
|
+
# # ignore "lib/templates/*.rb"
|
8
|
+
#
|
9
|
+
# # library "pathname", "set" # Standard libraries
|
10
|
+
# library "numo-narray" # Gems
|
11
|
+
end
|
12
|
+
|
13
|
+
# target :spec do
|
14
|
+
# signature "sig", "sig-private"
|
15
|
+
#
|
16
|
+
# check "spec"
|
17
|
+
#
|
18
|
+
# # library "pathname", "set" # Standard libraries
|
19
|
+
# # library "rspec"
|
20
|
+
# end
|
data/numo-liblinear.gemspec
CHANGED
@@ -46,9 +46,4 @@ Gem::Specification.new do |spec|
|
|
46
46
|
}
|
47
47
|
|
48
48
|
spec.add_runtime_dependency 'numo-narray', '~> 0.9.1'
|
49
|
-
|
50
|
-
spec.add_development_dependency 'bundler', '~> 2.0'
|
51
|
-
spec.add_development_dependency 'rake', '~> 12.0'
|
52
|
-
spec.add_development_dependency 'rake-compiler', '~> 1.0'
|
53
|
-
spec.add_development_dependency 'rspec', '~> 3.0'
|
54
49
|
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module Numo
|
2
|
+
module Liblinear
|
3
|
+
module SolverType
|
4
|
+
L2R_LR: Integer
|
5
|
+
L2R_L2LOSS_SVC_DUAL: Integer
|
6
|
+
L2R_L2LOSS_SVC: Integer
|
7
|
+
L2R_L1LOSS_SVC_DUAL: Integer
|
8
|
+
MCSVM_CS: Integer
|
9
|
+
L1R_L2LOSS_SVC: Integer
|
10
|
+
L1R_LR: Integer
|
11
|
+
L2R_LR_DUAL: Integer
|
12
|
+
L2R_L2LOSS_SVR: Integer
|
13
|
+
L2R_L2LOSS_SVR_DUAL: Integer
|
14
|
+
L2R_L1LOSS_SVR_DUAL: Integer
|
15
|
+
ONECLASS_SVM: Integer
|
16
|
+
end
|
17
|
+
|
18
|
+
LIBLINEAR_VERSION: Integer
|
19
|
+
VERSION: String
|
20
|
+
|
21
|
+
type model = {
|
22
|
+
nr_class: Integer,
|
23
|
+
nr_feature: Integer,
|
24
|
+
w: Numo::DFloat,
|
25
|
+
label: Numo::Int32,
|
26
|
+
bias: Float,
|
27
|
+
rho: Float
|
28
|
+
}
|
29
|
+
|
30
|
+
type param = {
|
31
|
+
solver_type: Integer?,
|
32
|
+
eps: Float?,
|
33
|
+
C: Float?,
|
34
|
+
nr_weight: Integer?,
|
35
|
+
weight_label: Numo::Int32?,
|
36
|
+
weight: Numo::DFloat?,
|
37
|
+
p: Float?,
|
38
|
+
nu: Float?,
|
39
|
+
verbose: bool?,
|
40
|
+
random_seed: Integer?
|
41
|
+
}
|
42
|
+
|
43
|
+
def self?.cv: (Numo::DFloat x, Numo::DFloat y, param, Integer n_folds) -> Numo::DFloat
|
44
|
+
def self?.train: (Numo::DFloat x, Numo::DFloat y, param) -> model
|
45
|
+
def self?.predict: (Numo::DFloat x, param, model) -> Numo::DFloat
|
46
|
+
def self?.predict_proba: (Numo::DFloat x, param, model) -> Numo::DFloat
|
47
|
+
def self?.decision_function: (Numo::DFloat x, param, model) -> Numo::DFloat
|
48
|
+
def self?.save_model: (String filename, param, model) -> bool
|
49
|
+
def self?.load_model: (String filename) -> [param, model]
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
data/sig/patch.rbs
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: numo-liblinear
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yoshoku
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: numo-narray
|
@@ -24,62 +24,6 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.9.1
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: bundler
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '2.0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '2.0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rake
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '12.0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '12.0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rake-compiler
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '1.0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '1.0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rspec
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '3.0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '3.0'
|
83
27
|
description: |
|
84
28
|
Numo::Liblinear is a Ruby gem binding to the LIBLINEAR library.
|
85
29
|
LIBLINEAR is one of the famous libraries for large-scale regularized linear classification and regression.
|
@@ -101,6 +45,7 @@ files:
|
|
101
45
|
- LICENSE.txt
|
102
46
|
- README.md
|
103
47
|
- Rakefile
|
48
|
+
- Steepfile
|
104
49
|
- ext/numo/liblinear/converter.c
|
105
50
|
- ext/numo/liblinear/converter.h
|
106
51
|
- ext/numo/liblinear/extconf.rb
|
@@ -127,6 +72,8 @@ files:
|
|
127
72
|
- lib/numo/liblinear.rb
|
128
73
|
- lib/numo/liblinear/version.rb
|
129
74
|
- numo-liblinear.gemspec
|
75
|
+
- sig/numo/liblinear.rbs
|
76
|
+
- sig/patch.rbs
|
130
77
|
homepage: https://github.com/yoshoku/numo-liblinear
|
131
78
|
licenses:
|
132
79
|
- BSD-3-Clause
|
@@ -134,7 +81,7 @@ metadata:
|
|
134
81
|
homepage_uri: https://github.com/yoshoku/numo-liblinear
|
135
82
|
source_code_uri: https://github.com/yoshoku/numo-liblinear
|
136
83
|
documentation_uri: https://yoshoku.github.io/numo-liblinear/doc/
|
137
|
-
post_install_message:
|
84
|
+
post_install_message:
|
138
85
|
rdoc_options: []
|
139
86
|
require_paths:
|
140
87
|
- lib
|
@@ -149,8 +96,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
96
|
- !ruby/object:Gem::Version
|
150
97
|
version: '0'
|
151
98
|
requirements: []
|
152
|
-
rubygems_version: 3.
|
153
|
-
signing_key:
|
99
|
+
rubygems_version: 3.1.6
|
100
|
+
signing_key:
|
154
101
|
specification_version: 4
|
155
102
|
summary: Numo::Liblinear is a Ruby gem binding to the LIBLINEAR library. Numo::Liblinear
|
156
103
|
makes to use the LIBLINEAR functions with dataset represented by Numo::NArray.
|