黒木玄 Gen Kuroki
- いいね数 389,756/311,170
- フォロー 995 フォロワー 14,556 ツイート 293,980
- 現在地 (^-^)/
- Web https://genkuroki.github.io/documents/
- 自己紹介 私については https://twilog.org/genkuroki と https://genkuroki.github.io と https://github.com/genkuroki と https://github.com/genkuroki/public を見て下さい。
2021年08月04日(水)

#RStats Rのchisq.testは非常に困ったことに、デフォルトでYatesの連続性補正を適用します。
2×2の分割表での、Yatesの連続性補正はセルの値が小さい場合には特に誤差を拡大して、検出力を非常に小さくしてしまいます。いかなる場合にも使用するべきではありません。 pic.twitter.com/qQvP3dTOlW
タグ: RStats
posted at 23:58:48

#RStats 注意を要するのが、黄土色で示された信頼区間の対応です。
信頼区間の数値が通常の丸め誤差よりもかなり大きい。
ついさっき、ソースコードを閲覧してその原因がRのuniroot函数の tol = 0.0001220703125 というデフォルトの設定らしいことを確認できました。 pic.twitter.com/kU3IrAZJUr
タグ: RStats
posted at 23:54:39

#RStats 私が #Julia言語 で実装し直した結果では、P値と信頼区間の整合性が保たれています。
私の実装でのアルゴリズム :fisher の場合がRのfisher.testのP値に対応しており、:fisher_dos (doubled one-sided)がfisher.testの信頼区間に対応していることが、添付画像から分かります。 pic.twitter.com/Fdlxp9IZGW
posted at 23:51:11

#RStats 実際、Rのfisher.testで表示される帰無仮説のP値と95%信頼区間の間に整合性がないのは、帰無仮説のP値と95%信頼区間の計算で本質的に異なるP値函数を使っているからです。
整合性がなくなるのは当然です。この仕様には疑問が残ります。 pic.twitter.com/c2tXkgpTqd
タグ: RStats
posted at 23:48:09


#RStats 実際、Rのfisher.testに分割表
16 4
4 6
を与えると、P値は0.0448…と表示されているのに、帰無仮説のパラメータ値の1を含む95%信頼区間 [0.860…, 44.0…] が表示されます。
(補足: Rのchisq.testでは残念なことに信頼区間は表示されません。) pic.twitter.com/OqzoIQE3hL
タグ: RStats
posted at 23:45:11


#Julia言語 一般にデータAとモデルのパラメーターωにP値を対応させるP値函数pvalue(A, ω)が与えられれば、信頼係数1-αの信頼区間は
CI(A, α) = { ω | pvalue(A, ω) ≥ α }を含む最小の区間
で定義できます。私の実装ではこの定義をそのまま素直に適用しています。
github.com/genkuroki/publ...
タグ: Julia言語
posted at 23:37:33

#Julia言語 私による2×2の分割表の独立性検定の信頼区間の最近の実装は
github.com/genkuroki/publ...
で読めます。カイ二乗検定に付随する信頼区間の理論的に詳しい解説は昔の
nbviewer.jupyter.org/gist/genkuroki...
にある。次のソースコードもたぶん有用。
nbviewer.jupyter.org/gist/genkuroki...
タグ: Julia言語
posted at 23:33:45

#RStats unirootはRで書かれた零点を求める函数です。
github.com/SurajGupta/r-s...
R自身はJuliaと違ってCやC++並には速くないので、実用的に十分な精度でより短時間で計算できることを目指したということなのだと思いました。
Rを使って結果を報告するときにはこの点に要注意。
タグ: RStats
posted at 23:29:01


#統計 #RStats
Rのfisher.testの信頼区間ではuniroot函数を使っている。
github.com/SurajGupta/r-s...
↓
www.rdocumentation.org/packages/stats...
github.com/SurajGupta/r-s...
uniroot函数のデフォルトは
tol = .Machine$double.eps^0.25 = 0.0001220703125
なので誤差は大きめ。
他の実装と比較するときに注意が必要。
posted at 23:22:25

@kankichi57301 メタメタさんあたりは、順序反対と言いつつ、式の意味だのなんだのおかしな世界に入り込んでいるので、乗数×被乗数、被乗数×乗数、どっちでもいいが、乗数と被乗数の区別は重要、とかいいそうですがね。
タグ:
posted at 22:27:05

@sekibunnteisuu 素でなんのこっちゃわかりませぬ。
<被乗数と乗数の関係の理解
たとえばタコ1匹あたりの足の数とタコの数は関係あるの?
#掛算
タグ: 掛算
posted at 22:24:50

>被乗数と乗数の関係の理解が重要と伝えても、理解する振りをしつつ
そんな人もいるのかもしれないけど
私自身は、被乗数・乗数という概念自体がナンセンス、という立場。
順序反対している人で、被乗数・乗数という概念自体は大切、という人って多いの? twitter.com/k_shinichichir... pic.twitter.com/bzedl4VtHk
タグ:
posted at 22:17:12


新しい記事がZennにアップされました!#Julia言語 #Julia日本語記事
zenn.dev/dannchu/articl...👈
タグ: Julia日本語記事 Julia言語
posted at 20:58:24

非公開
タグ:
posted at xx:xx:xx



非公開
タグ:
posted at xx:xx:xx

#超算数
「1あたり量、内包量が重要」という人のツイートだけど、
この世には、一体何種類の掛け算があるのだろうか?
画像貼り忘れた。twitter.com/koino1031/stat... pic.twitter.com/IxoGgxJhjS
タグ: 超算数
posted at 17:04:31

@JuliaLang Fork in the road is to DIY a machine-learning framework, doing reverse-mode AD and a few optimization algorithms, verses buying into an existing one.
I'd probably DIY if the alternative were SciPy but I'm really enjoying reading Julia code.
タグ:
posted at 16:59:49

Coming back to hacking after a relaxing summer break. (Okay, the kids still have a break for three more weeks, so some juggling required.)
I'll be diving into @julialang for my PCB layout project now that it's firmly framed as a machine-learning optimization problem. Onward!
タグ:
posted at 16:49:15

@dc1394 #Julia言語 私の環境ではCUDA.jlのテストが Julia v1.7.0-beta3 で通ります。
重要なポイント: julia --threads 4 のようにして起動して test CUDA しないと、途中で死ぬ。 pic.twitter.com/oYpl2qN17r
タグ: Julia言語
posted at 15:13:04

Prof. A Tomiya consu @AkioTomiya
twitter.com/AkioTomiya/sta...
This was introduced in a contest of LLVM and JIT compiler.
#julialang has both portablity and speed.
タグ: julialang
posted at 13:43:37

前にも書いたが、#Julia言語 のお陰で数学の勉強になっている所が正直かなりある。数学好きの集団が書いているコードを読むと、マジで数学の勉強になってしまいます。知らないことが沢山書いてあることが多い。 twitter.com/genkuroki/stat...
タグ: Julia言語
posted at 11:48:39

@physics303 論理的な証明の理解が最も強い証拠になりますが、現実には理解したつもりで誤解していたり、実際の実装では単純でない場合もある。
モンテカルロシミュレーションなどでの数値的確認は論理的には弱い証拠に過ぎないのですが、これの有無は結構大違いだと思います。
タグ:
posted at 11:44:40

@physics303 自分の仕事で使う場合には、この手の無保証のドキュメントに頼るのは危険なので、念の為に検証用のコードを書いてそこに書いてあることが本当に正しいかどうかの確認をしておきたいような気がします。
「O(n)で計算できる」と書いてあること自体は本当にO(n)で計算できることの証拠にはならない。
タグ:
posted at 11:41:00

@physics303 #Julia言語 そして、各アルゴリズムごとに計算にかかるコストに関する簡単な解説が書いてあります。論文を引用している場合もあります。
公式ドキュメントからソースコードにワンクリックで飛べるので、この手の調べ物をするのは結構楽です。非常に勉強になる。
例
↓
github.com/JuliaStats/Sta... pic.twitter.com/uYeH21Hr9P
タグ: Julia言語
posted at 11:33:39

@physics303 #Julia言語 質問する側も答える側もソースコードに目を通すべき。
ソースコードの直接の閲覧は時間の無駄を防ぐための基本中の基本。
引用されている公式ドキュメントからソースコードに飛べます。
github.com/JuliaStats/Sta... を見れば分かるように場合分けで複数のアルゴリズムを使っています。続く
タグ: Julia言語
posted at 11:27:59

非公開
タグ:
posted at xx:xx:xx



具体的な提案をしなければならないという使命感でYを出してくる人に困惑中。こういうことがあって、なんでもかんでも対案Yを考える姿勢も頂けないものなんだなと体験できた。Xを詳細に知れるほうがうれしい。 twitter.com/genkuroki/stat...
タグ:
posted at 09:50:59

And if you didn't have the time to watch the talk, here is a post in #JuliaLang official blog summarising our main findings: julialang.org/blog/2021/08/g...
タグ: JuliaLang
posted at 05:29:17

Dr. Chris Rackauckas @ChrisRackauckas
@vchuravy @F_Vaggi @oxinabox_frames @matvil Yeah, just force it on Binary builder for the good of all people
タグ:
posted at 04:33:06

Nathanael Wong (黄智信) @natgeo_wong
Time to step back a bit and start coding up more #JuliaLang packages I put on hold.
タグ: JuliaLang
posted at 04:33:02

@ChrisRackauckas @F_Vaggi @oxinabox_frames @matvil Protoyped and not yet production ready/ready to deploy. The big open question is how do we get the bitcode of the library being called.
タグ:
posted at 04:13:53

Dr. Chris Rackauckas @ChrisRackauckas
@F_Vaggi @oxinabox_frames @matvil The Enzyme talk had AD across language boundaries.
タグ:
posted at 04:03:43

Un blog para conocer el lenguaje de programación Julia, en castellano, aplicado a la enseñanza
matematicas-interactivas-con-julia.blogspot.com
#JuliaLang
タグ: JuliaLang
posted at 02:18:44

@sekai_tankyu 私が相手をするのを敬遠しているような人を、探求さんが対応していることもあります。
みんなで分担しながらやっていきましょう^^
まあ、変な人の相手をするのは疲れるので、ほどほどにすべきですがね。
タグ:
posted at 01:14:57

Kristoffer Carlsson @KristofferC89
@matvil www.youtube.com/watch?v=7PAqOK... has some discussion about calling into Julia from Rust.
タグ:
posted at 01:00:32

HiDPI matters. GR.jl 0.58.1 now offers Retina resolution for graphics and LaTeX formulas on all output devices: Windows GKS QtTerm, macOS GKSTerm and iTerm2 (with any remote #JuliaLang interpreter). pic.twitter.com/8jzw67KESs
タグ: JuliaLang
posted at 00:17:15



@oxinabox_frames @matvil The left over problems are genuinely really difficult - for example:
- AD across language boundaries
- JIT across language boundaries (maybe if all languages target LLVM it might be possible?)
タグ:
posted at 00:02:22