統計解析R たぶんpart3くらい (587レス)
前次1-
抽出解除 必死チェッカー(本家) (べ) 自ID レス栞 あぼーん

リロード規制です。10分ほどで解除するので、他のブラウザへ避難してください。
284: 2019/06/30(日)21:38 ID:6iFXy6Q7(1) AAS
DFT行列のチェックのバグ修正+testthat+lenses

``` {r}
with (c (big_data, n = 17, N = 1e+3, get = lenses::view, set = lenses::set), {
`%.%` = function (f, g) function (x) f (g (x));
values_l = lenses::index ('values');
square = function (a) (t %.% Conj) (a) %*% a;
out = outer (1 : n, 1 : n, function (i, j) {
ij = (i * j) %% n;
k = pracma::gcd (ij, n);
angle = 2 * pi * (ij %/% k) / (n %/% k);
complex (re = cos (angle), im = sin (angle));
});
testthat::test_that ('dft', {
# testthat::expect_equal (square (out), n * pracma::eye (n));
testthat::expect_equal ((Re %.% square) (out), n * pracma::eye (n));
testthat::expect_equal ((Im %.% square) (out), pracma::zeros (n));
});
k = (n - 2) : 2;
out = purrr::map (k, function (k) {
purrr::map (1 : N, function (.) {
out = out [sample.int (n, k), sample.int (n, k)];
out = eigen (out, only = true) %>% get (values_l);
(sum %.% log) (out) - 1 / 2 * log (k);
}) %>% get (lenses::unlist_l);
}) %>% set (lenses::names_l, k);
testthat::test_that ('det', purrr::map (out, function (out) {
testthat::expect_true ((all %.% is.finite) (out));
}));
purrr::map (out, Re) %>% ggwaterfall::waterfall_ft (show.labels = true);
});
```
前次1-
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル

ぬこの手 ぬこTOP 0.020s