libsvmloader 0.1.1 → 0.3.0

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
- SHA1:
3
- metadata.gz: 6dd47447989d49679eb08906fed4b769599010d4
4
- data.tar.gz: e72c3f971474f334d77a6cc023177234df573134
2
+ SHA256:
3
+ metadata.gz: 3c9126689f92d7501d691bdf6bbebf04ada08073d76839bf4599d70224f693e9
4
+ data.tar.gz: e4b83b0e4afc8c3760bd54b79349d8e5920a2cf7503194ee5a223bfec2517fd8
5
5
  SHA512:
6
- metadata.gz: 12d4211f18451f7cd05784692d723cfdd2d44d316bab57b6b914692ad74105dd7afa109dc1c5f9e0c54e028534132076f77f2dbd68ad671ed4e0a5e9e0bd978f
7
- data.tar.gz: 4707aa881f45015ccdc307aec89c7f6cce5e8007774b9951537aeb6a8e742bfc5b77409580355f462a290c80e1238a84f1b9d995f5f6e561332f4689786f24e9
6
+ metadata.gz: 6bb9d9de0b39b85a2ec0a206b8f8e2dbb7d4ba50ebabd672231432bfb1c895c5db5f0d433df0db03d2b8acad4429484c8ae07951a0ffde92d3a87a8144f92b35
7
+ data.tar.gz: f1b8262ac0e2dbfd8e990c0935cf6360e7b3c3e5ab43892899e3a92dcb22b377dc60f09bd98c92126b629d5a3bff6d649a64e2945459627b069425813c8f5396
data/.coveralls.yml ADDED
@@ -0,0 +1 @@
1
+ service_name: github-ci
@@ -0,0 +1,22 @@
1
+ name: build
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-20.04
8
+ strategy:
9
+ fail-fast: false
10
+ matrix:
11
+ ruby: [ '2.6', '2.7', '3.0' ]
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - name: Set up Ruby ${{ matrix.ruby }}
15
+ uses: actions/setup-ruby@v1
16
+ with:
17
+ ruby-version: ${{ matrix.ruby }}
18
+ - name: Build and test with Rake
19
+ run: |
20
+ gem install --no-document bundler
21
+ bundle install --jobs 4 --retry 3
22
+ bundle exec rake
@@ -0,0 +1,26 @@
1
+ name: coverage
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ coverage:
11
+ runs-on: ubuntu-20.04
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - name: Set up Ruby 2.7
15
+ uses: actions/setup-ruby@v1
16
+ with:
17
+ ruby-version: '2.7'
18
+ - name: Build and test with Rake
19
+ run: |
20
+ gem install bundler
21
+ bundle install
22
+ bundle exec rake
23
+ - name: Coveralls GitHub Action
24
+ uses: coverallsapp/github-action@v1.1.2
25
+ with:
26
+ github-token: ${{ secrets.GITHUB_TOKEN }}
data/.gitignore CHANGED
@@ -8,5 +8,14 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
 
11
+
11
12
  # rspec failure tracking
12
13
  .rspec_status
14
+
15
+ *.swp
16
+ .DS_Store
17
+ .ruby-version
18
+ /spec/dump_cmp.t
19
+ /spec/dump_dbl.t
20
+ /spec/dump_int.t
21
+ /spec/dump_zb.t
data/.rubocop.yml ADDED
@@ -0,0 +1,20 @@
1
+ require:
2
+ - rubocop-performance
3
+
4
+ AllCops:
5
+ NewCops: enable
6
+
7
+ Metrics/LineLength:
8
+ Max: 120
9
+
10
+ Metrics/ModuleLength:
11
+ Max: 200
12
+
13
+ Metrics/ClassLength:
14
+ Max: 200
15
+
16
+ Metrics/MethodLength:
17
+ Max: 40
18
+
19
+ Style/FormatStringToken:
20
+ Enabled: false
data/CHANGELOG.md ADDED
@@ -0,0 +1,27 @@
1
+ # 0.3.0
2
+ - Add type declaration file: sig/libsvmloader.rbs
3
+ - Refactor to avoid returning nil on array access.
4
+ - Fix some configuration files.
5
+
6
+ # 0.2.1
7
+ - Fixed the bug that failed to load if there is a space at the end of the line.
8
+
9
+ # 0.2.0
10
+ ## Breaking changes
11
+
12
+ LibSVMLoader has been modified to return the samples and labels of dataset as Ruby Array.
13
+ Thus, LibSVMLoader does not require NMatrix.
14
+
15
+ # 0.1.3
16
+ - Changed the visibility of protected methods to the private.
17
+ - Fixed the description in the gemspec file.
18
+
19
+ # 0.1.2
20
+ - Changed the way to read a file.
21
+
22
+ # 0.1.1
23
+ - Fixed to fail reading zero vectors.
24
+
25
+ # 0.1.0
26
+ - Added basic class.
27
+ - Added the methods that read and write a file with libsvm format.
data/Gemfile CHANGED
@@ -4,3 +4,11 @@ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
5
  # Specify your gem's dependencies in libsvmloader.gemspec
6
6
  gemspec
7
+
8
+ gem 'bundler', '~> 2.0'
9
+ gem 'rake', '~> 13.0'
10
+ gem 'rspec', '~> 3.0'
11
+ gem 'simplecov', '~> 0.19'
12
+ gem 'simplecov-lcov', '~> 0.8'
13
+ gem 'rbs', '~> 1.2'
14
+ gem 'steep', '~> 0.44'
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2017 yoshoku
3
+ Copyright (c) 2017-2021 yoshoku
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # LibSVMLoader
2
2
 
3
+ [![Build Status](https://github.com/yoshoku/LibSVMLoader/workflows/build/badge.svg)](https://github.com/yoshoku/LibSVMLoader/actions?query=workflow%3Abuild)
4
+ [![Coverage Status](https://coveralls.io/repos/github/yoshoku/LibSVMLoader/badge.svg?branch=main)](https://coveralls.io/github/yoshoku/LibSVMLoader?branch=main)
5
+ [![Gem Version](https://badge.fury.io/rb/libsvmloader.svg)](https://badge.fury.io/rb/libsvmloader)
6
+ [![MIT License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/yoshoku/LibSVMLoader/blob/main/LICENSE.txt)
7
+
3
8
  LibSVMLoader loads (and dumps) dataset file with the libsvm file format.
4
9
 
5
10
  ## Installation
@@ -28,15 +33,37 @@ samples, labels = LibSVMLoader.load_libsvm_file('foo.t')
28
33
  LibSVMLoader.dump_libsvm_file(samples, labels, 'bar.t')
29
34
 
30
35
  # for regression task
31
- samples, target_variables = LibSVMLoader.load_libsvm_file('foo.t', label_dtype: :float64)
36
+ samples, target_variables = LibSVMLoader.load_libsvm_file('foo.t', label_dtype: 'float')
32
37
  LibSVMLoader.dump_libsvm_file(samples, target_variables, 'bar.t')
33
38
  ```
34
39
 
35
- ## Development
40
+ When using with Numo::NArray:
41
+
42
+ ```ruby
43
+ require 'libsvmloader'
44
+ require 'numo/narray'
45
+
46
+ samples, labels = LibSVMLoader.load_libsvm_file('foo.t')
47
+
48
+ samples_na = Numo::NArray[*samples]
49
+ labels_na = Numo::NArray[*labels]
50
+
51
+ LibSVMLoader.dump_libsvm_file(samples_na.to_a, labels_na.to_a, 'bar.t')
52
+ ```
53
+
54
+ When using with NMatrix:
55
+
56
+ ```ruby
57
+ require 'libsvmloader'
58
+ require 'nmatrix/nmatrix'
59
+
60
+ samples, labels = LibSVMLoader.load_libsvm_file('foo.t')
36
61
 
37
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
62
+ samples_nm = N[*samples]
63
+ labels_nm = N[*labels]
38
64
 
39
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
65
+ LibSVMLoader.dump_libsvm_file(samples_nm.to_a, labels_nm.to_a, 'bar.t')
66
+ ```
40
67
 
41
68
  ## Contributing
42
69
 
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 "strong_json" # 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/lib/libsvmloader.rb CHANGED
@@ -1,95 +1,116 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  require 'libsvmloader/version'
3
- require 'nmatrix/nmatrix'
4
+ require 'csv'
4
5
 
5
6
  # LibSVMLoader loads (and dumps) dataset file with the libsvm file format.
6
7
  class LibSVMLoader
7
8
  class << self
8
- # Load a dataset with the libsvm file format into NMatrix.
9
+ # Load a dataset with the libsvm file format.
9
10
  #
10
- # @param filename [String] A path to a dataset file.
11
+ # @param filename [String] Path to a dataset file.
11
12
  # @param zero_based [Boolean] Whether the column index starts from 0 (true) or 1 (false).
12
- # @param stype [Symbol] The strorage type of the nmatrix consisting of feature vectors.
13
- # @param label_dtype [Symbol] The data type of the NMatrix consisting of labels or target values.
14
- # @param value_dtype [Symbol] The data type of the NMatrix consisting of feature vectors.
13
+ # @param label_dtype [String] Data type of labels or target values ('int', 'float', 'complex').
14
+ # @param value_dtype [String] Data type of feature vectors ('int', 'float', 'complex').
15
15
  #
16
- # @return [Array<NMatrix>]
16
+ # @return [Array<Array>]
17
17
  # Returns array containing the (n_samples x n_features) matrix for feature vectors
18
- # and (n_samples x 1) matrix for labels or target values.
19
- def load_libsvm_file(filename, zero_based: false, stype: :yale,
20
- label_dtype: :int32, value_dtype: :float64)
21
- ftvecs = []
18
+ # and (n_samples) vector for labels or target values.
19
+ def load_libsvm_file(filename, zero_based: false, label_dtype: 'int', value_dtype: 'float')
22
20
  labels = []
23
- n_features = 0
24
- File.open(filename, 'r') do |file|
25
- file.each_line do |line|
26
- label, ftvec, max_idx = parse_libsvm_line(line, zero_based)
27
- labels.push(label)
28
- ftvecs.push(ftvec)
29
- n_features = [n_features, max_idx].max
30
- end
21
+ ftvecs = []
22
+ maxids = []
23
+ label_class = parse_dtype(label_dtype)
24
+ value_class = parse_dtype(value_dtype)
25
+ CSV.foreach(filename, col_sep: "\s", headers: false) do |row|
26
+ label, ftvec, maxid = parse_libsvm_row(row, zero_based, label_class, value_class)
27
+ labels.push(label)
28
+ ftvecs.push(ftvec)
29
+ maxids.push(maxid)
31
30
  end
32
- [convert_to_nmatrix(ftvecs, n_features, value_dtype, stype),
33
- NMatrix.new([labels.size, 1], labels, dtype: label_dtype)]
31
+ [convert_to_matrix(ftvecs, maxids.max + 1, value_class), labels]
34
32
  end
35
33
 
36
34
  # Dump the dataset with the libsvm file format.
37
35
  #
38
- # @param data [NMatrix] (n_samples x n_features) matrix consisting of feature vectors.
39
- # @param labels [NMatrix] (n_samples x 1) matrix consisting of labels or target values.
40
- # @param filename [String] A path to the output libsvm file.
36
+ # @param data [Array] (n_samples x n_features) matrix consisting of feature vectors.
37
+ # @param labels [Array] (n_samples) vector consisting of labels or target values.
38
+ # @param filename [String] Path to the output libsvm file.
41
39
  # @param zero_based [Boolean] Whether the column index starts from 0 (true) or 1 (false).
42
40
  def dump_libsvm_file(data, labels, filename, zero_based: false)
43
- n_samples = [data.rows, labels.rows].min
44
- label_type = detect_dtype(labels)
45
- value_type = detect_dtype(data)
41
+ n_samples = data.size < labels.size ? data.size : labels.size
42
+ label_format = detect_format(labels[0])
43
+ value_format = detect_format(data.flatten[0])
46
44
  File.open(filename, 'w') do |file|
47
- n_samples.times do |n|
48
- file.puts(dump_libsvm_line(labels[n], data.row(n),
49
- label_type, value_type, zero_based))
50
- end
45
+ n_samples.times { |n| file.puts(dump_libsvm_line(labels[n], data[n], label_format, value_format, zero_based)) }
51
46
  end
52
47
  end
53
48
 
54
- protected
49
+ private
55
50
 
56
- def parse_libsvm_line(line, zero_based)
57
- tokens = line.split
58
- label = tokens.shift.to_f
59
- ftvec = tokens.map do |el|
51
+ def parse_libsvm_row(row, zero_based, label_type, value_type)
52
+ label = convert_type(row.shift, label_type)
53
+ adj_idx = zero_based == false ? 1 : 0
54
+ max_idx = -1
55
+ ftvec = []
56
+ while (el = row.shift)
60
57
  idx, val = el.split(':')
61
- idx = idx.to_i - (zero_based == false ? 1 : 0)
62
- [idx, val.to_f]
58
+ idx = idx.to_i - adj_idx
59
+ max_idx = idx if max_idx < idx
60
+ ftvec.push([idx, convert_type(val, value_type)])
63
61
  end
64
- max_idx = ftvec.map { |el| el[0] }.max
65
- max_idx ||= 0
66
62
  [label, ftvec, max_idx]
67
63
  end
68
64
 
69
- def convert_to_nmatrix(data, n_features, value_dtype, stype)
70
- n_samples = data.size
71
- mat = NMatrix.zeros([n_samples, n_features + 1],
72
- dtype: value_dtype, stype: stype)
73
- data.each_with_index do |ftvec, n|
74
- ftvec.each do |el|
75
- mat[n, el[0]] = el[1]
76
- end
65
+ def parse_dtype(dtype)
66
+ case dtype.to_s
67
+ when /^(int)/i
68
+ :int
69
+ when /^(float)/i
70
+ :float
71
+ when /^(complex)/i
72
+ :complex
73
+ else
74
+ :string
75
+ end
76
+ end
77
+
78
+ def convert_type(value, dtype)
79
+ case dtype
80
+ when :int
81
+ value.to_i
82
+ when :float
83
+ value.to_f
84
+ when :complex
85
+ value.to_c
86
+ else
87
+ value
88
+ end
89
+ end
90
+
91
+ def convert_to_matrix(data, n_features, value_type)
92
+ z = convert_type(0, value_type)
93
+ data.map do |ft|
94
+ vec = Array.new(n_features) { z }
95
+ ft.each { |idx, val| vec[idx] = val }
96
+ vec
77
97
  end
78
- mat
79
98
  end
80
99
 
81
- def detect_dtype(data)
100
+ def detect_format(data)
82
101
  type = '%s'
83
- type = '%d' if %i[int8 int16 int32 int64].include?(data.dtype)
84
- type = '%.10g' if %i[float32 float64].include?(data.dtype)
102
+ type = '%d' if data.is_a?(Integer)
103
+ type = '%.10g' if data.is_a?(Float)
85
104
  type
86
105
  end
87
106
 
88
- def dump_libsvm_line(label, ftvec, label_type, value_type, zero_based)
89
- line = format(label_type.to_s, label)
90
- ftvec.to_a.each_with_index do |val, n|
91
- idx = n + (zero_based == false ? 1 : 0)
92
- line += format(" %d:#{value_type}", idx, val) if val != 0.0
107
+ def dump_libsvm_line(label, ftvec, label_format, value_format, zero_based)
108
+ line = format(label_format, label)
109
+ ftvec.each_with_index do |val, n|
110
+ unless val.zero?
111
+ idx = n + (zero_based == false ? 1 : 0)
112
+ line += format(" %d:#{value_format}", idx, val)
113
+ end
93
114
  end
94
115
  line
95
116
  end
@@ -1,11 +1,5 @@
1
- #module LibSVMLoader
2
- # VERSION = "0.1.0"
3
- #end
1
+ # frozen_string_literal: true
2
+
4
3
  class LibSVMLoader
5
- module VERSION
6
- MAJOR = 0
7
- MINOR = 1
8
- TINY = 1
9
- STRING = [MAJOR, MINOR, TINY].compact.join('.')
10
- end
4
+ VERSION = '0.3.0'
11
5
  end
data/libsvmloader.gemspec CHANGED
@@ -1,27 +1,28 @@
1
1
  # coding: utf-8
2
- lib = File.expand_path("../lib", __FILE__)
2
+ lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require "libsvmloader/version"
4
+ require 'libsvmloader/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = "libsvmloader"
8
- spec.version = LibSVMLoader::VERSION::STRING
9
- spec.authors = ["yoshoku"]
10
- spec.email = ["yoshoku@outlook.com"]
7
+ spec.name = 'libsvmloader'
8
+ spec.version = LibSVMLoader::VERSION
9
+ spec.authors = ['yoshoku']
10
+ spec.email = ['yoshoku@outlook.com']
11
11
 
12
- spec.summary = %q{LibSVMLoader loads (and dumps) dataset file with the libsvm file format.}
13
- spec.homepage = "https://github.com/yoshoku/libsvmloader"
14
- spec.license = "MIT"
12
+ spec.summary = <<MSG
13
+ LibSVMLoader loads (and dumps) dataset file with the libsvm file format.
14
+ MSG
15
+ spec.description = <<MSG
16
+ LibSVMLoader is a class that loads (and dumps) dataset file with the libsvm file format.
17
+ The feature vectors and labels of dataset are represented by Ruby Array.
18
+ MSG
19
+ spec.homepage = 'https://github.com/yoshoku/libsvmloader'
20
+ spec.license = 'MIT'
15
21
 
16
22
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
23
  f.match(%r{^(test|spec|features)/})
18
24
  end
19
- spec.bindir = "exe"
25
+ spec.bindir = 'exe'
20
26
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
- spec.require_paths = ["lib"]
22
-
23
- spec.add_development_dependency "bundler", "~> 1.15"
24
- spec.add_development_dependency "rake", "~> 10.0"
25
- spec.add_development_dependency "rspec", "~> 3.0"
26
- spec.add_development_dependency "nmatrix", "~> 0.2.3"
27
+ spec.require_paths = ['lib']
27
28
  end
@@ -0,0 +1,18 @@
1
+ # LibSVMLoader loads (and dumps) dataset file with the libsvm file format.
2
+ class LibSVMLoader
3
+ VERSION: String
4
+
5
+ def self.load_libsvm_file: (String filename, ?zero_based: bool zero_based,
6
+ ?label_dtype: String label_dtype, ?value_dtype: String value_dtype) -> Array[Array[untyped]]
7
+ def self.dump_libsvm_file: (Array[Array[untyped]] data, Array[Numeric | String] labels, String filename,
8
+ ?zero_based: bool zero_based) -> void
9
+
10
+ private
11
+
12
+ def self.parse_libsvm_row: (Array[String] row, bool zero_based, Symbol label_type, Symbol value_type) -> Array[untyped]
13
+ def self.parse_dtype: (String | Symbol dtype) -> Symbol
14
+ def self.convert_type: (untyped value, Symbol dtype) -> untyped
15
+ def self.convert_to_matrix: (Array[untyped] data, Integer n_features, Symbol value_type) -> Array[Array[untyped]]
16
+ def self.detect_format: (untyped data) -> String
17
+ def self.dump_libsvm_line: (Numeric | String label, Array[untyped] ftvec, String label_format, String value_format, bool zero_based) -> String
18
+ end
metadata CHANGED
@@ -1,93 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libsvmloader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - yoshoku
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-11 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.15'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.15'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '10.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '10.0'
41
- - !ruby/object:Gem::Dependency
42
- name: rspec
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '3.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '3.0'
55
- - !ruby/object:Gem::Dependency
56
- name: nmatrix
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 0.2.3
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 0.2.3
69
- description:
11
+ date: 2021-06-12 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: |
14
+ LibSVMLoader is a class that loads (and dumps) dataset file with the libsvm file format.
15
+ The feature vectors and labels of dataset are represented by Ruby Array.
70
16
  email:
71
17
  - yoshoku@outlook.com
72
- executables:
73
- - libsvmloader
18
+ executables: []
74
19
  extensions: []
75
20
  extra_rdoc_files: []
76
21
  files:
22
+ - ".coveralls.yml"
23
+ - ".github/workflows/build.yml"
24
+ - ".github/workflows/coverage.yml"
77
25
  - ".gitignore"
78
26
  - ".rspec"
79
- - ".travis.yml"
27
+ - ".rubocop.yml"
28
+ - CHANGELOG.md
80
29
  - CODE_OF_CONDUCT.md
81
30
  - Gemfile
82
31
  - LICENSE.txt
83
32
  - README.md
84
33
  - Rakefile
85
- - bin/console
86
- - bin/setup
87
- - exe/libsvmloader
34
+ - Steepfile
88
35
  - lib/libsvmloader.rb
89
36
  - lib/libsvmloader/version.rb
90
37
  - libsvmloader.gemspec
38
+ - sig/libsvmloader.rbs
91
39
  homepage: https://github.com/yoshoku/libsvmloader
92
40
  licenses:
93
41
  - MIT
@@ -107,8 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
55
  - !ruby/object:Gem::Version
108
56
  version: '0'
109
57
  requirements: []
110
- rubyforge_project:
111
- rubygems_version: 2.6.13
58
+ rubygems_version: 3.1.6
112
59
  signing_key:
113
60
  specification_version: 4
114
61
  summary: LibSVMLoader loads (and dumps) dataset file with the libsvm file format.
data/.travis.yml DELETED
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.4.1
5
- before_install: gem install bundler -v 1.15.3
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "libsvmloader"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/exe/libsvmloader DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "libsvmloader"