alglib4 0.0.1 → 0.0.2
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 +4 -4
- data/README.md +13 -13
- data/ext/alglib/alglib.cpp +19 -17
- data/lib/alglib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32973f71af39bdcdb2ac898ba54b76842c4efdc0a19a82f21278715b9bee6a00
|
4
|
+
data.tar.gz: 4311f2affd506b8d8ca4ed9b2bdf62adbca2ddc34aee87647e87a8d880f7a15a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81ca2def3f1027a868eddc32507023eb833c3771416c8f6b4a9d34871b7664627d34b056e8499e791616c5ddcbeb5e2f893e2330ca3b2913a29af07a46306264
|
7
|
+
data.tar.gz: 777fcade111e5011e094dd0c6f832400f17dd66805670e7a632cd4a1d407b6698c8261dc67d0f07de629f4cabdb035df9563501bd21349bce49b6899544b1165
|
data/README.md
CHANGED
@@ -89,14 +89,14 @@ rake install
|
|
89
89
|
|
90
90
|
#### 2D Array / Matrix Functions
|
91
91
|
|
92
|
-
- `
|
93
|
-
- `
|
94
|
-
- `
|
95
|
-
- `
|
96
|
-
- `
|
97
|
-
- `
|
98
|
-
- `
|
99
|
-
- `
|
92
|
+
- `cov_matrix`, `cov_matrix_with_size`
|
93
|
+
- `pearson_corr_matrix`, `pearson_corr_matrix_with_size`
|
94
|
+
- `spearman_corr_matrix`, `spearman_corr_matrix_with_size`
|
95
|
+
- `cov_matrix2`, `cov_matrix2_with_size`
|
96
|
+
- `pearson_corr_matrix2`, `pearson_corr_matrix2_with_size`
|
97
|
+
- `spearman_corr_matrix2`, `spearman_corr_matrix2_with_size`
|
98
|
+
- `rank_data`, `rank_data_with_size`
|
99
|
+
- `rank_data_centered`, `rank_data_centered_with_size`
|
100
100
|
|
101
101
|
#### Statistical Tests
|
102
102
|
|
@@ -124,13 +124,13 @@ moments = Alglib.sample_moments(arr) # => { "mean" => ..., "variance" => ..., ..
|
|
124
124
|
|
125
125
|
# 2D statistics
|
126
126
|
mat = [[1, 2], [3, 4], [5, 6]]
|
127
|
-
cov = Alglib.
|
128
|
-
corr = Alglib.
|
129
|
-
ranked = Alglib.
|
130
|
-
centered_ranked = Alglib.
|
127
|
+
cov = Alglib.cov_matrix(mat)
|
128
|
+
corr = Alglib.pearson_corr_matrix(mat)
|
129
|
+
ranked = Alglib.rank_data(mat)
|
130
|
+
centered_ranked = Alglib.rank_data_centered(mat)
|
131
131
|
|
132
132
|
# with_size version
|
133
|
-
cov2 = Alglib.
|
133
|
+
cov2 = Alglib.cov_matrix_with_size(mat, 3, 2)
|
134
134
|
|
135
135
|
# Statistical test
|
136
136
|
result = Alglib.pearson_correlation_significance(0.8, 10) # => { "bothtails" => ..., ... }
|
data/ext/alglib/alglib.cpp
CHANGED
@@ -43,7 +43,9 @@ extern "C" void Init_alglib()
|
|
43
43
|
.define_module_function("real_1d_array_to_ruby_array", &real_1d_array_to_ruby_array)
|
44
44
|
.define_module_function("real_2d_array_to_ruby_array", &real_2d_array_to_ruby_array)
|
45
45
|
.define_module_function("integer_2d_array_to_ruby_array", &integer_2d_array_to_ruby_array)
|
46
|
-
.define_module_function("integer_1d_array_to_ruby_array", &integer_1d_array_to_ruby_array)
|
46
|
+
.define_module_function("integer_1d_array_to_ruby_array", &integer_1d_array_to_ruby_array);
|
47
|
+
|
48
|
+
rb_mAlglib
|
47
49
|
.define_module_function("pca_build_basis", &rb_pcabuildbasis);
|
48
50
|
|
49
51
|
rb_mAlglib
|
@@ -59,22 +61,22 @@ extern "C" void Init_alglib()
|
|
59
61
|
.define_module_function("pearson_corr2", &rb_pearsoncorr2)
|
60
62
|
.define_module_function("spearman_corr2", &rb_spearmancorr2)
|
61
63
|
// 2D array/matrix statistical functions
|
62
|
-
.define_module_function("
|
63
|
-
.define_module_function("
|
64
|
-
.define_module_function("
|
65
|
-
.define_module_function("
|
66
|
-
.define_module_function("
|
67
|
-
.define_module_function("
|
68
|
-
.define_module_function("
|
69
|
-
.define_module_function("
|
70
|
-
.define_module_function("
|
71
|
-
.define_module_function("
|
72
|
-
.define_module_function("
|
73
|
-
.define_module_function("
|
74
|
-
.define_module_function("
|
75
|
-
.define_module_function("
|
76
|
-
.define_module_function("
|
77
|
-
.define_module_function("
|
64
|
+
.define_module_function("cov_matrix", &rb_covm)
|
65
|
+
.define_module_function("cov_matrix_with_size", &rb_covm_with_size)
|
66
|
+
.define_module_function("pearson_corr_matrix", &rb_pearsoncorrm)
|
67
|
+
.define_module_function("pearson_corr_matrix_with_size", &rb_pearsoncorrm_with_size)
|
68
|
+
.define_module_function("spearman_corr_matrix", &rb_spearmancorrm)
|
69
|
+
.define_module_function("spearman_corr_matrix_with_size", &rb_spearmancorrm_with_size)
|
70
|
+
.define_module_function("cov_matrix2", &rb_covm2)
|
71
|
+
.define_module_function("cov_matrix2_with_size", &rb_covm2_with_size)
|
72
|
+
.define_module_function("pearson_corr_matrix2", &rb_pearsoncorrm2)
|
73
|
+
.define_module_function("pearson_corr_matrix2_with_size", &rb_pearsoncorrm2_with_size)
|
74
|
+
.define_module_function("spearman_corr_matrix2", &rb_spearmancorrm2)
|
75
|
+
.define_module_function("spearman_corr_matrix2_with_size", &rb_spearmancorrm2_with_size)
|
76
|
+
.define_module_function("rank_data", &rb_rankdata)
|
77
|
+
.define_module_function("rank_data_with_size", &rb_rankdata_with_size)
|
78
|
+
.define_module_function("rank_data_centered", &rb_rankdatacentered)
|
79
|
+
.define_module_function("rank_data_centered_with_size", &rb_rankdatacentered_with_size)
|
78
80
|
.define_module_function("pearson_correlation_significance", &rb_pearsoncorrelationsignificance)
|
79
81
|
.define_module_function("spearman_rank_correlation_significance", &rb_spearmanrankcorrelationsignificance)
|
80
82
|
.define_module_function("jarque_bera_test", &rb_jarqueberatest)
|
data/lib/alglib/version.rb
CHANGED