rumale-svm 0.4.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/LICENSE.txt +1 -1
- data/README.md +5 -9
- data/lib/rumale/svm/linear_one_class_svm.rb +0 -3
- data/lib/rumale/svm/linear_svc.rb +0 -4
- data/lib/rumale/svm/linear_svr.rb +0 -3
- data/lib/rumale/svm/logistic_regression.rb +0 -3
- data/lib/rumale/svm/nu_svc.rb +0 -1
- data/lib/rumale/svm/nu_svr.rb +0 -1
- data/lib/rumale/svm/one_class_svm.rb +0 -1
- data/lib/rumale/svm/svc.rb +0 -1
- data/lib/rumale/svm/svr.rb +0 -1
- data/lib/rumale/svm/version.rb +2 -2
- data/sig/rumale/svm/linear_one_class_svm.rbs +24 -0
- data/sig/rumale/svm/linear_svc.rbs +37 -0
- data/sig/rumale/svm/linear_svr.rbs +29 -0
- data/sig/rumale/svm/logistic_regression.rbs +34 -0
- data/sig/rumale/svm/nu_svc.rbs +34 -0
- data/sig/rumale/svm/nu_svr.rbs +29 -0
- data/sig/rumale/svm/one_class_svm.rbs +27 -0
- data/sig/rumale/svm/svc.rbs +34 -0
- data/sig/rumale/svm/svr.rbs +30 -0
- data/sig/rumale/svm.rbs +5 -0
- metadata +27 -19
- data/.coveralls.yml +0 -1
- data/.gitignore +0 -18
- data/.rspec +0 -3
- data/.rubocop.yml +0 -107
- data/.travis.yml +0 -13
- data/CODE_OF_CONDUCT.md +0 -74
- data/Gemfile +0 -8
- data/Rakefile +0 -6
- data/rumale-svm.gemspec +0 -37
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8cb843c4d4245f90f57ee22722e8e899e8e5077e29773629001dccf9e243010
|
4
|
+
data.tar.gz: b26af5c7c940562086ee2f7859315779db0e2be372c47da4e518b6fa77099d35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ca52d3c96333ee5ee60ec43b36c9d7a80687d9a3241b29d0872cbc1569eb45e22966f52cbde34de103c43c46d88d64a8685703db58c58c9828db2d4daf8b9c7
|
7
|
+
data.tar.gz: ff2a02ec2891dcf3626af1033dd3b181b697e8a43155bb6923e3cda31ef2116581b77e1201e934d152d6667a7b51ccf943a498cccf9fb8617a438899a99b5cdf
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# Rumale::SVM
|
2
2
|
|
3
|
-
[![Build Status](https://
|
4
|
-
[![Coverage Status](https://coveralls.io/repos/github/yoshoku/rumale-svm/badge.svg?branch=
|
3
|
+
[![Build Status](https://github.com/yoshoku/rumale-svm/workflows/build/badge.svg)](https://github.com/yoshoku/rumale-svm/actions?query=workflow%3Abuild)
|
4
|
+
[![Coverage Status](https://coveralls.io/repos/github/yoshoku/rumale-svm/badge.svg?branch=main)](https://coveralls.io/github/yoshoku/rumale-svm?branch=main)
|
5
5
|
[![Gem Version](https://badge.fury.io/rb/rumale-svm.svg)](https://badge.fury.io/rb/rumale-svm)
|
6
|
-
[![BSD 3-Clause License](https://img.shields.io/badge/License-BSD%203--Clause-orange.svg)](https://github.com/yoshoku/rumale-svm/blob/
|
7
|
-
[![Documentation](
|
6
|
+
[![BSD 3-Clause License](https://img.shields.io/badge/License-BSD%203--Clause-orange.svg)](https://github.com/yoshoku/rumale-svm/blob/main/LICENSE.txt)
|
7
|
+
[![Documentation](https://img.shields.io/badge/api-reference-blue.svg)](https://yoshoku.github.io/rumale-svm/doc/)
|
8
8
|
|
9
9
|
Rumale::SVM provides support vector machine algorithms in
|
10
10
|
[LIBSVM](https://www.csie.ntu.edu.tw/~cjlin/libsvm/) and [LIBLINEAR](https://www.csie.ntu.edu.tw/~cjlin/liblinear/)
|
@@ -79,12 +79,8 @@ Accuracy: 0.835
|
|
79
79
|
|
80
80
|
## Contributing
|
81
81
|
|
82
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/yoshoku/rumale-svm. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](
|
82
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/yoshoku/rumale-svm. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](https://contributor-covenant.org) code of conduct.
|
83
83
|
|
84
84
|
## License
|
85
85
|
|
86
86
|
The gem is available as open source under the terms of the [BSD-3-Clause License](https://opensource.org/licenses/BSD-3-Clause).
|
87
|
-
|
88
|
-
## Code of Conduct
|
89
|
-
|
90
|
-
Everyone interacting in the Rumale::Svm project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/yoshoku/rumale-svm/blob/master/CODE_OF_CONDUCT.md).
|
@@ -58,10 +58,6 @@ module Rumale
|
|
58
58
|
@params[:tol] = tol.to_f
|
59
59
|
@params[:verbose] = verbose
|
60
60
|
@params[:random_seed] = random_seed.nil? ? nil : random_seed.to_i
|
61
|
-
@model = nil
|
62
|
-
@weight_vec = nil
|
63
|
-
@bias_term = nil
|
64
|
-
@prob_param = nil
|
65
61
|
end
|
66
62
|
|
67
63
|
# Fit the model with given training data.
|
data/lib/rumale/svm/nu_svc.rb
CHANGED
data/lib/rumale/svm/nu_svr.rb
CHANGED
data/lib/rumale/svm/svc.rb
CHANGED
data/lib/rumale/svm/svr.rb
CHANGED
data/lib/rumale/svm/version.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
module Rumale
|
5
5
|
# This module consists of Rumale interfaces for suppor vector machine algorithms with LIBSVM and LIBLINEAR.
|
6
6
|
module SVM
|
7
|
-
# The version of Rumale
|
8
|
-
VERSION = '0.
|
7
|
+
# The version of Rumale::SVM you are using.
|
8
|
+
VERSION = '0.6.0'
|
9
9
|
end
|
10
10
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Rumale
|
2
|
+
module SVM
|
3
|
+
class LinearOneClassSVM
|
4
|
+
include Base::BaseEstimator
|
5
|
+
include Validation
|
6
|
+
|
7
|
+
attr_reader weight_vec: Numo::DFloat
|
8
|
+
attr_reader bias_term: Float
|
9
|
+
|
10
|
+
def initialize: (?nu: Float nu, ?reg_param: Float reg_param, ?tol: Float tol,
|
11
|
+
?verbose: bool verbose, ?random_seed: untyped? random_seed) -> void
|
12
|
+
def fit: (Numo::DFloat x, ?untyped? _y) -> LinearOneClassSVM
|
13
|
+
def decision_function: (Numo::DFloat x) -> Numo::DFloat
|
14
|
+
def predict: (Numo::DFloat x) -> Numo::Int32
|
15
|
+
def marshal_dump: () -> { params: Hash[Symbol, untyped], model: untyped, weight_vec: Numo::DFloat, bias_term: Float }
|
16
|
+
def marshal_load: (untyped obj) -> void
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def liblinear_params: () -> untyped
|
21
|
+
def trained?: () -> bool
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module Rumale
|
2
|
+
module SVM
|
3
|
+
class LinearSVC
|
4
|
+
include Base::BaseEstimator
|
5
|
+
include Base::Classifier
|
6
|
+
|
7
|
+
attr_reader weight_vec: Numo::DFloat
|
8
|
+
attr_reader bias_term: Numo::DFloat
|
9
|
+
|
10
|
+
def initialize: (?penalty: String penalty, ?loss: String loss, ?dual: bool dual, ?reg_param: Float reg_param,
|
11
|
+
?fit_bias: bool fit_bias, ?bias_scale: Float bias_scale, ?probability: bool probability,
|
12
|
+
?tol: Float tol, ?verbose: bool verbose, ?random_seed: untyped? random_seed) -> void
|
13
|
+
def fit: (Numo::DFloat x, Numo::Int32 y) -> LinearSVC
|
14
|
+
def decision_function: (Numo::DFloat x) -> Numo::DFloat
|
15
|
+
def predict: (Numo::DFloat x) -> Numo::Int32
|
16
|
+
def predict_proba: (Numo::DFloat x) -> Numo::DFloat
|
17
|
+
def marshal_dump: () -> { params: Hash[Symbol, untyped], model: untyped, weight_vec: Numo::DFloat, bias_term: Numo::DFloat, prob_param: Numo::DFloat }
|
18
|
+
def marshal_load: (Hash[Symbol, untyped] obj) -> void
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def expand_feature: (Numo::DFloat x) -> Numo::DFloat
|
23
|
+
def weight_and_bias: (Numo::DFloat base_weight) -> [Numo::DFloat, Numo::DFloat]
|
24
|
+
def proba_model: (Numo::DFloat df, Numo::Int32 y) -> Numo::DFloat
|
25
|
+
def liblinear_params: () -> untyped
|
26
|
+
def solver_type: () -> Integer
|
27
|
+
def binary_class?: () -> bool
|
28
|
+
def fit_probability?: () -> bool
|
29
|
+
def fit_bias?: () -> bool
|
30
|
+
def bias_scale: () -> Float
|
31
|
+
def n_classes: () -> Integer
|
32
|
+
def n_features: () -> Integer
|
33
|
+
def labels: () -> Numo::Int32
|
34
|
+
def trained?: () -> bool
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Rumale
|
2
|
+
module SVM
|
3
|
+
class LinearSVR
|
4
|
+
include Base::BaseEstimator
|
5
|
+
include Base::Regressor
|
6
|
+
|
7
|
+
attr_reader weight_vec: Numo::DFloat
|
8
|
+
attr_reader bias_term: Numo::DFloat
|
9
|
+
|
10
|
+
def initialize: (?loss: String loss, ?dual: bool dual, ?reg_param: Float reg_param, ?epsilon: Float epsilon,
|
11
|
+
?fit_bias: bool fit_bias, ?bias_scale: Float bias_scale, ?tol: Float tol,
|
12
|
+
?verbose: bool verbose, ?random_seed: untyped? random_seed) -> void
|
13
|
+
def fit: (Numo::DFloat x, Numo::DFloat y) -> LinearSVR
|
14
|
+
def predict: (Numo::DFloat x) -> Numo::DFloat
|
15
|
+
def marshal_dump: () -> { params: Hash[Symbol, untyped], model: untyped, weight_vec: Numo::DFloat, bias_term: Numo::DFloat }
|
16
|
+
def marshal_load: (Hash[Symbol, untyped] obj) -> void
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def expand_feature: (Numo::DFloat x) -> Numo::DFloat
|
21
|
+
def weight_and_bias: (Numo::DFloat base_weight) -> [Numo::DFloat, Numo::DFloat]
|
22
|
+
def liblinear_params: () -> untyped
|
23
|
+
def solver_type: () -> Integer
|
24
|
+
def fit_bias?: () -> bool
|
25
|
+
def bias_scale: () -> Float
|
26
|
+
def trained?: () -> bool
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module Rumale
|
2
|
+
module SVM
|
3
|
+
class LogisticRegression
|
4
|
+
include Base::BaseEstimator
|
5
|
+
include Base::Classifier
|
6
|
+
|
7
|
+
attr_reader weight_vec: Numo::DFloat
|
8
|
+
attr_reader bias_term: Numo::DFloat
|
9
|
+
|
10
|
+
def initialize: (?penalty: String penalty, ?dual: bool dual, ?reg_param: Float reg_param,
|
11
|
+
?fit_bias: bool fit_bias, ?bias_scale: Float bias_scale, ?tol: Float tol,
|
12
|
+
?verbose: bool verbose, ?random_seed: untyped? random_seed) -> void
|
13
|
+
def fit: (Numo::DFloat x, Numo::Int32 y) -> LogisticRegression
|
14
|
+
def decision_function: (Numo::DFloat x) -> Numo::DFloat
|
15
|
+
def predict: (Numo::DFloat x) -> Numo::Int32
|
16
|
+
def predict_proba: (Numo::DFloat x) -> Numo::DFloat
|
17
|
+
def marshal_dump: () -> { params: Hash[Symbol, untyped], model: untyped, weight_vec: Numo::DFloat, bias_term: Numo::DFloat }
|
18
|
+
def marshal_load: (untyped obj) -> void
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def expand_feature: (Numo::DFloat x) -> Numo::DFloat
|
23
|
+
def weight_and_bias: (Numo::DFloat base_weight) -> [Numo::DFloat, Numo::DFloat]
|
24
|
+
def liblinear_params: () -> untyped
|
25
|
+
def solver_type: () -> Integer
|
26
|
+
def binary_class?: () -> bool
|
27
|
+
def fit_bias?: () -> bool
|
28
|
+
def bias_scale: () -> Float
|
29
|
+
def n_classes: () -> Integer
|
30
|
+
def n_features: () -> Integer
|
31
|
+
def trained?: () -> bool
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module Rumale
|
2
|
+
module SVM
|
3
|
+
class NuSVC
|
4
|
+
include Base::BaseEstimator
|
5
|
+
include Base::Classifier
|
6
|
+
|
7
|
+
def initialize: (?nu: Float nu, ?kernel: String kernel, ?degree: Integer degree, ?gamma: Float gamma, ?coef0: Float coef0,
|
8
|
+
?shrinking: bool shrinking, ?probability: bool probability,
|
9
|
+
?cache_size: Float cache_size, ?tol: Float tol,
|
10
|
+
?verbose: bool verbose, ?random_seed: untyped? random_seed) -> void
|
11
|
+
def fit: (Numo::DFloat x, Numo::Int32 y) -> NuSVC
|
12
|
+
def decision_function: (Numo::DFloat x) -> Numo::DFloat
|
13
|
+
def predict: (Numo::DFloat x) -> Numo::Int32
|
14
|
+
def predict_proba: (Numo::DFloat x) -> Numo::DFloat
|
15
|
+
def marshal_dump: () -> { params: Hash[Symbol, untyped], model: untyped }
|
16
|
+
def marshal_load: (untyped obj) -> void
|
17
|
+
def support: () -> Numo::Int32
|
18
|
+
def support_vectors: () -> Numo::DFloat
|
19
|
+
def n_support: () -> Numo::Int32
|
20
|
+
def duel_coef: () -> Numo::DFloat
|
21
|
+
def intercept: () -> Numo::DFloat
|
22
|
+
def prob_a: () -> Numo::DFloat
|
23
|
+
def prob_b: () -> Numo::DFloat
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def add_index_col: (Numo::DFloat x) -> Numo::DFloat
|
28
|
+
def del_index_col: (Numo::DFloat x) -> Numo::DFloat
|
29
|
+
def precomputed_kernel?: () -> bool
|
30
|
+
def libsvm_params: () -> untyped
|
31
|
+
def trained?: () -> bool
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Rumale
|
2
|
+
module SVM
|
3
|
+
class NuSVR
|
4
|
+
include Base::BaseEstimator
|
5
|
+
include Base::Regressor
|
6
|
+
|
7
|
+
def initialize: (?nu: Float nu, ?kernel: String kernel, ?degree: Integer degree, ?gamma: Float gamma, ?coef0: Float coef0,
|
8
|
+
?shrinking: bool shrinking, ?cache_size: Float cache_size, ?tol: Float tol,
|
9
|
+
?verbose: bool verbose, ?random_seed: untyped? random_seed) -> void
|
10
|
+
def fit: (Numo::DFloat x, Numo::DFloat y) -> NuSVR
|
11
|
+
def predict: (Numo::DFloat x) -> Numo::DFloat
|
12
|
+
def marshal_dump: () -> { params: Hash[Symbol, untyped], model: untyped }
|
13
|
+
def marshal_load: (Hash[Symbol, untyped] obj) -> void
|
14
|
+
def support: () -> Numo::Int32
|
15
|
+
def support_vectors: () -> Numo::DFloat
|
16
|
+
def n_support: () -> Integer
|
17
|
+
def duel_coef: () -> Numo::DFloat
|
18
|
+
def intercept: () -> Numo::DFloat
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def add_index_col: (Numo::DFloat x) -> Numo::DFloat
|
23
|
+
def del_index_col: (Numo::DFloat x) -> Numo::DFloat
|
24
|
+
def precomputed_kernel?: () -> bool
|
25
|
+
def libsvm_params: () -> untyped
|
26
|
+
def trained?: () -> bool
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Rumale
|
2
|
+
module SVM
|
3
|
+
class OneClassSVM
|
4
|
+
include Base::BaseEstimator
|
5
|
+
include Validation
|
6
|
+
|
7
|
+
def initialize: (?nu: Float nu, ?kernel: String kernel, ?degree: Integer degree, ?gamma: Float gamma, ?coef0: Float coef0,
|
8
|
+
?shrinking: bool shrinking, ?cache_size: Float cache_size, ?tol: Float tol,
|
9
|
+
?verbose: bool verbose, ?random_seed: untyped? random_seed) -> void
|
10
|
+
def fit: (Numo::DFloat x, ?untyped? _y) -> OneClassSVM
|
11
|
+
def decision_function: (Numo::DFloat x) -> Numo::DFloat
|
12
|
+
def predict: (Numo::DFloat x) -> Numo::Int32
|
13
|
+
def marshal_dump: () -> { params: Hash[Symbol, untyped], model: untyped }
|
14
|
+
def marshal_load: (Hash[Symbol, untyped] obj) -> void
|
15
|
+
def support: () -> Numo::Int32
|
16
|
+
def support_vectors: () -> Numo::DFloat
|
17
|
+
def n_support: () -> Integer
|
18
|
+
def duel_coef: () -> Numo::DFloat
|
19
|
+
def intercept: () -> Numo::DFloat
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def libsvm_params: () -> untyped
|
24
|
+
def trained?: () -> bool
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module Rumale
|
2
|
+
module SVM
|
3
|
+
class SVC
|
4
|
+
include Base::BaseEstimator
|
5
|
+
include Base::Classifier
|
6
|
+
|
7
|
+
def initialize: (?reg_param: Float reg_param, ?kernel: String kernel, ?degree: Integer degree, ?gamma: Float gamma,
|
8
|
+
?coef0: Float coef0, ?shrinking: bool shrinking, ?probability: bool probability,
|
9
|
+
?cache_size: Float cache_size, ?tol: Float tol,
|
10
|
+
?verbose: bool verbose, ?random_seed: untyped? random_seed) -> void
|
11
|
+
def fit: (Numo::DFloat x, Numo::Int32 y) -> SVC
|
12
|
+
def decision_function: (Numo::DFloat x) -> Numo::DFloat
|
13
|
+
def predict: (Numo::DFloat x) -> Numo::Int32
|
14
|
+
def predict_proba: (Numo::DFloat x) -> Numo::DFloat
|
15
|
+
def marshal_dump: () -> { params: Hash[Symbol, untyped], model: untyped }
|
16
|
+
def marshal_load: (Hash[Symbol, untyped] obj) -> nil
|
17
|
+
def support: () -> Numo::Int32
|
18
|
+
def support_vectors: () -> Numo::DFloat
|
19
|
+
def n_support: () -> Numo::Int32
|
20
|
+
def duel_coef: () -> Numo::DFloat
|
21
|
+
def intercept: () -> Numo::DFloat
|
22
|
+
def prob_a: () -> Numo::DFloat
|
23
|
+
def prob_b: () -> Numo::DFloat
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def add_index_col: (Numo::DFloat x) -> Numo::DFloat
|
28
|
+
def del_index_col: (Numo::DFloat x) -> Numo::DFloat
|
29
|
+
def precomputed_kernel?: () -> bool
|
30
|
+
def libsvm_params: () -> untyped
|
31
|
+
def trained?: () -> bool
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Rumale
|
2
|
+
module SVM
|
3
|
+
class SVR
|
4
|
+
include Base::BaseEstimator
|
5
|
+
include Base::Regressor
|
6
|
+
|
7
|
+
def initialize: (?reg_param: Float reg_param, ?epsilon: Float epsilon, ?kernel: String kernel, ?degree: Integer degree,
|
8
|
+
?gamma: Float gamma, ?coef0: Float coef0, ?shrinking: bool shrinking,
|
9
|
+
?cache_size: Float cache_size, ?tol: Float tol,
|
10
|
+
?verbose: bool verbose, ?random_seed: untyped? random_seed) -> void
|
11
|
+
def fit: (Numo::DFloat x, Numo::DFloat y) -> SVR
|
12
|
+
def predict: (Numo::DFloat x) -> Numo::DFloat
|
13
|
+
def marshal_dump: () -> { params: Hash[Symbol, untyped], model: untyped }
|
14
|
+
def marshal_load: (Hash[Symbol, untyped] obj) -> void
|
15
|
+
def support: () -> Numo::Int32
|
16
|
+
def support_vectors: () -> Numo::DFloat
|
17
|
+
def n_support: () -> Integer
|
18
|
+
def duel_coef: () -> Numo::DFloat
|
19
|
+
def intercept: () -> Numo::DFloat
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def add_index_col: (Numo::DFloat x) -> Numo::DFloat
|
24
|
+
def del_index_col: (Numo::DFloat x) -> Numo::DFloat
|
25
|
+
def precomputed_kernel?: () -> bool
|
26
|
+
def libsvm_params: () -> untyped
|
27
|
+
def trained?: () -> bool
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/sig/rumale/svm.rbs
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rumale-svm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yoshoku
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: numo-liblinear
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: numo-libsvm
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '2.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '2.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rumale
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -45,6 +45,9 @@ dependencies:
|
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0.14'
|
48
|
+
- - "<"
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '0.24'
|
48
51
|
type: :runtime
|
49
52
|
prerelease: false
|
50
53
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -52,7 +55,10 @@ dependencies:
|
|
52
55
|
- - "~>"
|
53
56
|
- !ruby/object:Gem::Version
|
54
57
|
version: '0.14'
|
55
|
-
|
58
|
+
- - "<"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0.24'
|
61
|
+
description: 'Rumale::SVM provides support vector machine algorithms of LIBSVM and
|
56
62
|
LIBLINEAR with Rumale interface.
|
57
63
|
|
58
64
|
'
|
@@ -62,17 +68,9 @@ executables: []
|
|
62
68
|
extensions: []
|
63
69
|
extra_rdoc_files: []
|
64
70
|
files:
|
65
|
-
- ".coveralls.yml"
|
66
|
-
- ".gitignore"
|
67
|
-
- ".rspec"
|
68
|
-
- ".rubocop.yml"
|
69
|
-
- ".travis.yml"
|
70
71
|
- CHANGELOG.md
|
71
|
-
- CODE_OF_CONDUCT.md
|
72
|
-
- Gemfile
|
73
72
|
- LICENSE.txt
|
74
73
|
- README.md
|
75
|
-
- Rakefile
|
76
74
|
- lib/rumale/svm.rb
|
77
75
|
- lib/rumale/svm/linear_one_class_svm.rb
|
78
76
|
- lib/rumale/svm/linear_svc.rb
|
@@ -84,15 +82,25 @@ files:
|
|
84
82
|
- lib/rumale/svm/svc.rb
|
85
83
|
- lib/rumale/svm/svr.rb
|
86
84
|
- lib/rumale/svm/version.rb
|
87
|
-
- rumale
|
85
|
+
- sig/rumale/svm.rbs
|
86
|
+
- sig/rumale/svm/linear_one_class_svm.rbs
|
87
|
+
- sig/rumale/svm/linear_svc.rbs
|
88
|
+
- sig/rumale/svm/linear_svr.rbs
|
89
|
+
- sig/rumale/svm/logistic_regression.rbs
|
90
|
+
- sig/rumale/svm/nu_svc.rbs
|
91
|
+
- sig/rumale/svm/nu_svr.rbs
|
92
|
+
- sig/rumale/svm/one_class_svm.rbs
|
93
|
+
- sig/rumale/svm/svc.rbs
|
94
|
+
- sig/rumale/svm/svr.rbs
|
88
95
|
homepage: https://github.com/yoshoku/rumale-svm
|
89
96
|
licenses:
|
90
97
|
- BSD-3-Clause
|
91
98
|
metadata:
|
92
99
|
homepage_uri: https://github.com/yoshoku/rumale-svm
|
93
100
|
source_code_uri: https://github.com/yoshoku/rumale-svm
|
94
|
-
changelog_uri: https://github.com/yoshoku/rumale-svm/blob/
|
101
|
+
changelog_uri: https://github.com/yoshoku/rumale-svm/blob/main/CHANGELOG.md
|
95
102
|
documentation_uri: https://yoshoku.github.io/rumale-svm/doc/
|
103
|
+
rubygems_mfa_required: 'true'
|
96
104
|
post_install_message:
|
97
105
|
rdoc_options: []
|
98
106
|
require_paths:
|
@@ -108,9 +116,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
116
|
- !ruby/object:Gem::Version
|
109
117
|
version: '0'
|
110
118
|
requirements: []
|
111
|
-
rubygems_version: 3.
|
119
|
+
rubygems_version: 3.2.33
|
112
120
|
signing_key:
|
113
121
|
specification_version: 4
|
114
|
-
summary: Rumale
|
122
|
+
summary: Rumale::SVM provides support vector machine algorithms of LIBSVM and LIBLINEAR
|
115
123
|
with Rumale interface.
|
116
124
|
test_files: []
|
data/.coveralls.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
service_name: travis-ci
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.rubocop.yml
DELETED
@@ -1,107 +0,0 @@
|
|
1
|
-
require:
|
2
|
-
- rubocop-performance
|
3
|
-
- rubocop-rspec
|
4
|
-
|
5
|
-
AllCops:
|
6
|
-
TargetRubyVersion: 2.4
|
7
|
-
DisplayCopNames: true
|
8
|
-
DisplayStyleGuide: true
|
9
|
-
Exclude:
|
10
|
-
- 'bin/*'
|
11
|
-
- 'rumale-svm.gemspec'
|
12
|
-
- 'Rakefile'
|
13
|
-
- 'Gemfile'
|
14
|
-
|
15
|
-
Layout/EmptyLineAfterGuardClause:
|
16
|
-
Enabled: false
|
17
|
-
|
18
|
-
Layout/EmptyLinesAroundAttributeAccessor:
|
19
|
-
Enabled: true
|
20
|
-
|
21
|
-
Layout/LineLength:
|
22
|
-
Max: 145
|
23
|
-
IgnoredPatterns: ['(\A|\s)#']
|
24
|
-
|
25
|
-
Layout/SpaceAroundMethodCallOperator:
|
26
|
-
Enabled: true
|
27
|
-
|
28
|
-
Lint/DeprecatedOpenSSLConstant:
|
29
|
-
Enabled: true
|
30
|
-
|
31
|
-
Lint/RaiseException:
|
32
|
-
Enabled: true
|
33
|
-
|
34
|
-
Lint/StructNewOverride:
|
35
|
-
Enabled: true
|
36
|
-
|
37
|
-
Metrics/ModuleLength:
|
38
|
-
Max: 200
|
39
|
-
|
40
|
-
Metrics/ClassLength:
|
41
|
-
Max: 200
|
42
|
-
|
43
|
-
Metrics/MethodLength:
|
44
|
-
Max: 40
|
45
|
-
|
46
|
-
Metrics/AbcSize:
|
47
|
-
Max: 60
|
48
|
-
|
49
|
-
Metrics/CyclomaticComplexity:
|
50
|
-
Max: 16
|
51
|
-
|
52
|
-
Metrics/PerceivedComplexity:
|
53
|
-
Max: 16
|
54
|
-
|
55
|
-
Metrics/BlockLength:
|
56
|
-
Max: 40
|
57
|
-
Exclude:
|
58
|
-
- 'spec/**/*'
|
59
|
-
|
60
|
-
Metrics/ParameterLists:
|
61
|
-
Max: 12
|
62
|
-
|
63
|
-
Naming/MethodParameterName:
|
64
|
-
Enabled: false
|
65
|
-
|
66
|
-
Naming/ConstantName:
|
67
|
-
Enabled: false
|
68
|
-
|
69
|
-
Security/MarshalLoad:
|
70
|
-
Enabled: false
|
71
|
-
|
72
|
-
Style/Documentation:
|
73
|
-
Enabled: false
|
74
|
-
|
75
|
-
Style/ExponentialNotation:
|
76
|
-
Enabled: true
|
77
|
-
|
78
|
-
Style/HashEachMethods:
|
79
|
-
Enabled: true
|
80
|
-
|
81
|
-
Style/HashTransformKeys:
|
82
|
-
Enabled: true
|
83
|
-
|
84
|
-
Style/HashTransformValues:
|
85
|
-
Enabled: true
|
86
|
-
|
87
|
-
Style/SlicingWithRange:
|
88
|
-
Enabled: true
|
89
|
-
|
90
|
-
Style/FormatStringToken:
|
91
|
-
Enabled: false
|
92
|
-
|
93
|
-
Style/NumericLiterals:
|
94
|
-
Enabled: false
|
95
|
-
|
96
|
-
RSpec/MultipleExpectations:
|
97
|
-
Enabled: false
|
98
|
-
|
99
|
-
RSpec/ExampleLength:
|
100
|
-
Max: 40
|
101
|
-
|
102
|
-
RSpec/InstanceVariable:
|
103
|
-
Enabled: false
|
104
|
-
|
105
|
-
RSpec/LeakyConstantDeclaration:
|
106
|
-
Enabled: false
|
107
|
-
|
data/.travis.yml
DELETED
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
17
|
-
* Using welcoming and inclusive language
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
* Gracefully accepting constructive criticism
|
20
|
-
* Focusing on what is best for the community
|
21
|
-
* Showing empathy towards other community members
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
39
|
-
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at yoshoku@outlook.com. All
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
63
|
-
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
66
|
-
members of the project's leadership.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
-
|
73
|
-
[homepage]: http://contributor-covenant.org
|
74
|
-
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
DELETED
data/Rakefile
DELETED
data/rumale-svm.gemspec
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
lib = File.expand_path('lib', __dir__)
|
2
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
-
require 'rumale/svm/version'
|
4
|
-
|
5
|
-
Gem::Specification.new do |spec|
|
6
|
-
spec.name = 'rumale-svm'
|
7
|
-
spec.version = Rumale::SVM::VERSION
|
8
|
-
spec.authors = ['yoshoku']
|
9
|
-
spec.email = ['yoshoku@outlook.com']
|
10
|
-
|
11
|
-
spec.summary = <<~MSG
|
12
|
-
Rumale-SVM provides support vector machine algorithms of LIBSVM and LIBLINEAR with Rumale interface.
|
13
|
-
MSG
|
14
|
-
spec.description = <<~MSG
|
15
|
-
Rumale-SVM provides support vector machine algorithms of LIBSVM and LIBLINEAR with Rumale interface.
|
16
|
-
MSG
|
17
|
-
spec.homepage = 'https://github.com/yoshoku/rumale-svm'
|
18
|
-
spec.license = 'BSD-3-Clause'
|
19
|
-
|
20
|
-
spec.metadata['homepage_uri'] = spec.homepage
|
21
|
-
spec.metadata['source_code_uri'] = 'https://github.com/yoshoku/rumale-svm'
|
22
|
-
spec.metadata['changelog_uri'] = 'https://github.com/yoshoku/rumale-svm/blob/master/CHANGELOG.md'
|
23
|
-
spec.metadata['documentation_uri'] = 'https://yoshoku.github.io/rumale-svm/doc/'
|
24
|
-
|
25
|
-
# Specify which files should be added to the gem when it is released.
|
26
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
27
|
-
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
28
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
29
|
-
end
|
30
|
-
spec.bindir = 'exe'
|
31
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
32
|
-
spec.require_paths = ['lib']
|
33
|
-
|
34
|
-
spec.add_runtime_dependency 'numo-liblinear', '~> 1.1'
|
35
|
-
spec.add_runtime_dependency 'numo-libsvm', '~> 1.0'
|
36
|
-
spec.add_runtime_dependency 'rumale', '~> 0.14'
|
37
|
-
end
|