Skip to content

Commit a469e4b

Browse files
committed
chore: remove red-datasets-numo-narray
1 parent 033d9dd commit a469e4b

File tree

4 files changed

+2
-24
lines changed

4 files changed

+2
-24
lines changed

rumale/Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ gem 'rumale-preprocessing', path: '../rumale-preprocessing'
2525
gem 'rumale-tree', path: '../rumale-tree'
2626

2727
gem 'rake', '~> 13.0'
28-
gem 'red-datasets-numo-narray', '~> 0.0.1'
2928
gem 'rspec', '~> 3.0'
3029
gem 'simplecov', '~> 0.21'
3130

rumale/spec/housing.dat

55.5 KB
Binary file not shown.

rumale/spec/iris.dat

5.42 KB
Binary file not shown.

rumale/spec/spec_helper.rb

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,13 @@
11
# frozen_string_literal: true
22

33
require 'rumale'
4-
require 'datasets-numo-narray'
54

65
def iris
7-
dataset = Datasets::LIBSVM.new('iris').to_narray
8-
x = dataset[true, 1..-1]
9-
y = Numo::Int32.cast(dataset[true, 0])
10-
11-
ss = Rumale::ModelSelection::StratifiedShuffleSplit.new(n_splits: 1, test_size: 0.2, random_seed: 38)
12-
train_ids, test_ids = ss.split(x, y)[0]
13-
14-
{ x_train: x[train_ids, true].dup,
15-
y_train: y[train_ids].dup,
16-
x_test: x[test_ids, true].dup,
17-
y_test: y[test_ids].dup }
6+
Marshal.load(File.binread('spec/iris.dat')) # rubocop:disable Security/MarshalLoad
187
end
198

209
def housing
21-
dataset = Datasets::LIBSVM.new('housing', note: 'scaled to [-1,1]').to_narray
22-
x = dataset[true, 1..-1]
23-
y = dataset[true, 0]
24-
25-
ss = Rumale::ModelSelection::ShuffleSplit.new(n_splits: 1, test_size: 0.1, random_seed: 38)
26-
train_ids, test_ids = ss.split(x, y)[0]
27-
28-
{ x_train: x[train_ids, true].dup,
29-
y_train: y[train_ids].dup,
30-
x_test: x[test_ids, true].dup,
31-
y_test: y[test_ids].dup }
10+
Marshal.load(File.binread('spec/housing.dat')) # rubocop:disable Security/MarshalLoad
3211
end
3312

3413
RSpec.configure do |config|

0 commit comments

Comments
 (0)