num4anova 0.0.16-java → 0.1.2-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb1dd347cd1156e1cc9e06ee7b4daff32442d6fc721e35553cbb406ae5d94cf1
4
- data.tar.gz: 17d4c4084a40fe8e721829169e2551455d258f64dd4ef6c537b499ef9a5dab15
3
+ metadata.gz: ab6d4ccfb1be143b1d3884f5946a053b48f64176c2c629586798db9c0a286e28
4
+ data.tar.gz: 74b4bb07862055a7e0be83a9e3c0de07ff9272715b70e4c9d7f84f7134329f1c
5
5
  SHA512:
6
- metadata.gz: 768b64803a235265e1dae41341428a0bda9fb12245e7f2fae54a3f75f8aeee607a4cd3709b578b1c7aeb6869fcc7f227b287d2142b99411ed8955248eeafedd4
7
- data.tar.gz: da4c649d32a38c9f9a83adadc54d20605bfebe42f822fdd353df7ba8e00df8e3be8fbd8c4775474da5299957a477ec98c4912ec1ac5b8fb0d305c0f11ad91ff0
6
+ metadata.gz: ab2c722af19199df5a51ac6891c309ed322ba4c4d576bc7bef04afbdf99a8ce770f6792aa6a3bb867d621d7ba7ffa855784f88b0eb08c509fd8aefc2d5bab837
7
+ data.tar.gz: 608304d1297cdb9282376790a00cfe8dd891ec00e254a79e7e566e2bac9385b1ce3489fdab10db9bd9f1b733faa912379371d25dbb026e36f87df25ed4360239
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## [0.1.2] - 2024-05-27
6
+ ### add
7
+ - add function of create_oneway in TwoWayLayoutLib.
8
+
9
+ ## [0.1.1] - 2024-05-15
10
+ ### change
11
+ - chg module name to Num4MultiCompLib from MultiCompLib
12
+
5
13
  ## [0.0.16] - 2024-04-16
6
14
 
7
15
  ### add
@@ -29,6 +29,11 @@ public class TwoWayLayout {
29
29
  double statistic = twoway.calcTestStatistic(xij);
30
30
  return twoway.execute_test(statistic, a);
31
31
  }
32
+ public double[][] createOneWay(double[][][] xij){
33
+ CreateOneWay twoway = new CreateOneWay();
34
+
35
+ return twoway.cnvOneWay(xij);
36
+ }
32
37
  /*********************************/
33
38
  /* interface define */
34
39
  /*********************************/
@@ -356,5 +361,23 @@ public class TwoWayLayout {
356
361
  return sumRi;
357
362
  }
358
363
  }
364
+ // 1元配置用データ作成
365
+ private class CreateOneWay {
366
+ public double[][] cnvOneWay(double[][][] xij) {
367
+ int a = xij.length;
368
+ int b = xij[0].length;
369
+ double[][] meanXij = new double[a][b];
370
+ DescriptiveStatistics stat = new DescriptiveStatistics();
371
+
372
+ for(int i = 0; i < a; i++) {
373
+ for(int j = 0; j < b; j++) {
374
+ Arrays.stream(xij[i][j]).forEach(stat::addValue);
375
+ meanXij[i][j] = stat.getMean();
376
+ stat.clear();
377
+ }
378
+ }
379
+ return meanXij;
380
+ }
381
+ }
359
382
  }
360
383
 
data/lib/num4anova.rb CHANGED
@@ -256,6 +256,46 @@ module Num4AnovaLib
256
256
  def friedman_test(xij, a)
257
257
  ret = @twoWay.friedmanTest(xij.to_java(Java::double[]), a)
258
258
  return ret
259
+ end
260
+ # 1元配置用データ作成
261
+ #
262
+ # @overload create_oneway(xij)
263
+ # @param [array] xij データ(double[][][])
264
+ # @return [array] 3次元データを2次元データに変換した値
265
+ # @example
266
+ # xij = [
267
+ # [
268
+ # [13.2, 15.7, 11.9],
269
+ # [16.1, 15.7, 15.1],
270
+ # [9.1, 10.3, 8.2],
271
+ # ],
272
+ # [
273
+ # [22.8, 25.7, 18.5],
274
+ # [24.5, 21.2, 24.2],
275
+ # [11.9, 14.3, 13.7],
276
+ # ],
277
+ # [
278
+ # [21.8, 26.3, 32.1],
279
+ # [26.9, 31.3, 28.3],
280
+ # [15.1, 13.6, 16.2],
281
+ # ],
282
+ # [
283
+ # [25.7, 28.8, 29.5],
284
+ # [30.1, 33.8, 29.6],
285
+ # [15.2, 17.3, 14.8],
286
+ # ],
287
+ # ]
288
+ # twoWay = Num4AnovaLib::TwoWayLayoutLib.new
289
+ # twoWay.create_oneway(xij)
290
+ # =>
291
+ # xij = [
292
+ # [13.6, 15.6, 9.2],
293
+ # [22.3, 23.3, 13.3],
294
+ # [26.7, 28.8, 15.0],
295
+ # [28.0, 31.2, 15.8],
296
+ # ]
297
+ def create_oneway(xij)
298
+ return @twoWay.createOneWay(xij.to_java(Java::double[][]))
259
299
  end
260
300
  end
261
301
  # 共分散分析
@@ -8,7 +8,7 @@ require_relative('dunnet')
8
8
  java_import 'MultiComp'
9
9
  # 多重比較を行う
10
10
  # (Apache commoms math3使用)
11
- module MultiCompLib
11
+ module Num4MultiCompLib
12
12
  # パラメトリック検定
13
13
  class ParametrixTestLib
14
14
  include DunnetTestLib
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: num4anova
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.1.2
5
5
  platform: java
6
6
  authors:
7
7
  - siranovel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-16 00:00:00.000000000 Z
11
+ date: 2024-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -69,9 +69,9 @@ files:
69
69
  - lib/dunnet.rb
70
70
  - lib/jcommon-1.0.23.jar
71
71
  - lib/jfreechart-1.5.4.jar
72
- - lib/multicomp.rb
73
72
  - lib/num4anova.rb
74
- homepage: http://github.com/siranovel/num4varanly
73
+ - lib/num4multicomp.rb
74
+ homepage: http://github.com/siranovel/num4anova
75
75
  licenses:
76
76
  - MIT
77
77
  metadata: {}