rumale-tree 0.25.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: c7d5bc0866c2b2c19e9177666cd78e625a4131545cfa49d8b56b209f35a8ad70
4
- data.tar.gz: 6180e47593acf04a58a8476c33cc3cfa54f05d49e2b3121d1a8cc172efb0a706
3
+ metadata.gz: a71957b21116e3224657fe98ca031bb49eac076f87f5a57fb16cd2ad5ecc2744
4
+ data.tar.gz: a514b1afe06b53d8ad31215be9a26b97ac895f5c081de238a873aeaac48516cd
5
5
  SHA512:
6
- metadata.gz: e2861501f69c318864b37d58d97e5f2a4e295f77b0bed2d57d9003e3c250ac74edaea80d72c473b5f279b9996ec5d8e438089273735cd68ba7ab5b8a5b48efb8
7
- data.tar.gz: 971e67d7e717c1dfc1751eb717599b072c69b1913ffce8a1bb64db4fb285c8aa6b48fdb1e5007c159c807b54ea20871190bce2fadd74d4d4722edcb0ee18abe4
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.25.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.25.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-01-18 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.25.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.25.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: