rumale-tree 0.26.0 → 0.27.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
2
  SHA256:
3
- metadata.gz: eae93f4d3753b16336ffed4b0a467cf09ddb33b0b89005a83ed5088ea2b362ef
4
- data.tar.gz: 73d6c88f3653b5d2c70ef884fb7f5ef5a68e91d79abd19570476c13f02c434c6
3
+ metadata.gz: a71957b21116e3224657fe98ca031bb49eac076f87f5a57fb16cd2ad5ecc2744
4
+ data.tar.gz: a514b1afe06b53d8ad31215be9a26b97ac895f5c081de238a873aeaac48516cd
5
5
  SHA512:
6
- metadata.gz: 6a5fa902ab481cc7fe7bdbc38e2e4da2f57c4b712d47fef6daabfd757d263949e19d12c5324a7ff0b0372e656a435908d3049380aef4f241c7ff39fc8914bf44
7
- data.tar.gz: 7a5e3b465549928e01143949e4001d7825882a687591adb91f82f7b753f7527c4fa2e5787ad5af263777855f3e8a3e5101386fdc361da3940f7f6dce0933c5bb
6
+ metadata.gz: 824e108abe1fdc1c7c15f4c9298fe6f9ee6189e37374049a4b5a7c9154021e89de8ea7bb87759fdb0d45867ea678ccc5f8c4911298dc103ee7829f8cdfd91062
7
+ data.tar.gz: ab7a7fce4a106979a150605ebc383cbe66bc7733064e9158218629f3ef6d405908dd4d195c0ed423b09d9c55071a0b19373e9582edc58d4f8b323b02df317fa0
@@ -217,15 +217,8 @@ static VALUE find_split_params_cls(VALUE self, VALUE criterion, VALUE impurity,
217
217
  ndfunc_t ndf = {(na_iter_func_t)iter_find_split_params_cls, NO_LOOP, 3, 1, ain, aout};
218
218
  split_opts_cls opts = {StringValuePtr(criterion), NUM2LONG(n_classes), NUM2DBL(impurity)};
219
219
  VALUE params = na_ndloop3(&ndf, &opts, 3, order, features, labels);
220
- VALUE results = rb_ary_new2(4);
221
- double* params_ptr = (double*)na_get_pointer_for_read(params);
222
- rb_ary_store(results, 0, DBL2NUM(params_ptr[0]));
223
- rb_ary_store(results, 1, DBL2NUM(params_ptr[1]));
224
- rb_ary_store(results, 2, DBL2NUM(params_ptr[2]));
225
- rb_ary_store(results, 3, DBL2NUM(params_ptr[3]));
226
- RB_GC_GUARD(params);
227
220
  RB_GC_GUARD(criterion);
228
- return results;
221
+ return params;
229
222
  }
230
223
 
231
224
  /**
@@ -335,15 +328,8 @@ static VALUE find_split_params_reg(VALUE self, VALUE criterion, VALUE impurity,
335
328
  ndfunc_t ndf = {(na_iter_func_t)iter_find_split_params_reg, NO_LOOP, 3, 1, ain, aout};
336
329
  split_opts_reg opts = {StringValuePtr(criterion), NUM2DBL(impurity)};
337
330
  VALUE params = na_ndloop3(&ndf, &opts, 3, order, features, targets);
338
- VALUE results = rb_ary_new2(4);
339
- double* params_ptr = (double*)na_get_pointer_for_read(params);
340
- rb_ary_store(results, 0, DBL2NUM(params_ptr[0]));
341
- rb_ary_store(results, 1, DBL2NUM(params_ptr[1]));
342
- rb_ary_store(results, 2, DBL2NUM(params_ptr[2]));
343
- rb_ary_store(results, 3, DBL2NUM(params_ptr[3]));
344
- RB_GC_GUARD(params);
345
331
  RB_GC_GUARD(criterion);
346
- return results;
332
+ return params;
347
333
  }
348
334
 
349
335
  /**
@@ -424,12 +410,7 @@ static VALUE find_split_params_grad_reg(VALUE self, VALUE order, VALUE features,
424
410
  ndfunc_t ndf = {(na_iter_func_t)iter_find_split_params_grad_reg, NO_LOOP, 4, 1, ain, aout};
425
411
  double opts[3] = {NUM2DBL(sum_gradient), NUM2DBL(sum_hessian), NUM2DBL(reg_lambda)};
426
412
  VALUE params = na_ndloop3(&ndf, opts, 4, order, features, gradients, hessians);
427
- VALUE results = rb_ary_new2(2);
428
- double* params_ptr = (double*)na_get_pointer_for_read(params);
429
- rb_ary_store(results, 0, DBL2NUM(params_ptr[0]));
430
- rb_ary_store(results, 1, DBL2NUM(params_ptr[1]));
431
- RB_GC_GUARD(params);
432
- return results;
413
+ return params;
433
414
  }
434
415
 
435
416
  /**
@@ -5,6 +5,6 @@ module Rumale
5
5
  # This module consists of the classes that implement tree models.
6
6
  module Tree
7
7
  # @!visibility private
8
- VERSION = '0.26.0'
8
+ VERSION = '0.27.0'
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rumale-tree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.0
4
+ version: 0.27.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - yoshoku
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-19 00:00:00.000000000 Z
11
+ date: 2023-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: numo-narray
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.26.0
33
+ version: 0.27.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: 0.26.0
40
+ version: 0.27.0
41
41
  description: Rumale::Tree provides classifier and regression based on decision tree
42
42
  algorithms with Rumale interface.
43
43
  email: