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 +4 -4
- data/ext/rumale/tree/ext.c +3 -22
- data/lib/rumale/tree/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a71957b21116e3224657fe98ca031bb49eac076f87f5a57fb16cd2ad5ecc2744
|
4
|
+
data.tar.gz: a514b1afe06b53d8ad31215be9a26b97ac895f5c081de238a873aeaac48516cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 824e108abe1fdc1c7c15f4c9298fe6f9ee6189e37374049a4b5a7c9154021e89de8ea7bb87759fdb0d45867ea678ccc5f8c4911298dc103ee7829f8cdfd91062
|
7
|
+
data.tar.gz: ab7a7fce4a106979a150605ebc383cbe66bc7733064e9158218629f3ef6d405908dd4d195c0ed423b09d9c55071a0b19373e9582edc58d4f8b323b02df317fa0
|
data/ext/rumale/tree/ext.c
CHANGED
@@ -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
|
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
|
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
|
-
|
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
|
/**
|
data/lib/rumale/tree/version.rb
CHANGED
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.
|
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-
|
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.
|
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.
|
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:
|