Twitter APIの仕様変更のため、「いいね」の新規取得を終了いたしました

黒木玄 Gen Kuroki

@genkuroki

  • いいね数 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 を見て下さい。
Favolog ホーム » @genkuroki » 2023年01月
«< 前のページ1234567のページ >»
並び順 : 新→古 | 古→新

2023年01月31日(火)

OokuboTact 大久保中二病中年 @OokuboTact

23年1月31日

(小学校の)掛け算の固定強制について、素人がよく発言するのはいいんだけど・・・
先行研究を知らずにドヤ顔で自説を自信満々で披露するのは周回遅れ
例えば「掛け順はできない生徒のための方便として開発された」

タグ:

posted at 23:31:49

Naoki_O @nananao2236

23年1月31日

もちろん、財務官僚的には、デマでもなんでも利用して国民全員への無償接種をやめさせたくはあるだろうけれども

タグ:

posted at 23:28:21

Naoki_O @nananao2236

23年1月31日

最近思うのは、今はもう「デマを通じて接種を妨げる」段階は終わって、中心にいるのは「デマを通じて偽健康食品や非保険医療に誘導する詐欺」目的の人なんじゃないかってことで>反ワクチンに根拠なし 河野デジタル相が演説 www.sankei.com/article/202301... @Sankei_newsより

タグ:

posted at 23:27:02

黒木玄 Gen Kuroki @genkuroki

23年1月31日

#統計 Mann-WhitneyのU検定は「2群の母集団分布がぴったり等しい」(←超絶強い条件なので否定し易い)という仮説の検定になっているので、2群の母集団分布がどちらも左右対称で、平均値と中央値だけではなく、分散も互いに等しくても、尖度が異なると有意差が出易くなります。

タグ: 統計

posted at 22:51:15

黒木玄 Gen Kuroki @genkuroki

23年1月31日

#統計

❌Mann-WhitneyのU検定は中央値の差の検定

という説明もよく見るが、これも酷い誤り。

Mann-WhitneyのU検定は「2群の母集団分布がぴったり等しい」(←超絶強い条件なので否定し易い)という仮説の検定であり、実践的には無条件で全然使えない検定法です。

twilog.org/genkuroki/sear... twitter.com/masujun0079/st...

タグ: 統計

posted at 22:47:55

黒木玄 Gen Kuroki @genkuroki

23年1月31日

#統計 しかし、よくありがちなことなのだが、

⭕️定義に戻って地道に計算して必要な結果を出すこと

を経由して、便利な言葉(例:DAG)を習得すると、その便利な言葉も自然に使いこなせるようになっていることが多い。

いつでも、定義に基く地道な計算という値に足を付けた思考法に戻れる点が強い。

タグ: 統計

posted at 22:27:01

黒木玄 Gen Kuroki @genkuroki

23年1月31日

#統計 モデル内確率変数として必要なものをシンプルに定義してしまえば、

⭕️定義に戻って地道に計算して必要な結果を出すこと

をDAGの言葉を使わずに原理的には遂行可能になり、証明抜きで語られるDAGの言葉を使う定理に依存し切る必要がなくなる。(モデルがシンプルなら本当にそうなる。)

タグ: 統計

posted at 22:27:00

黒木玄 Gen Kuroki @genkuroki

23年1月31日

#統計 1つ上のツイートに書いた媒介分析については添付画像の通り。

確率変数M_{x'} と Y_{xx'}=Y_{x, M_{x'}} をモデルの中で定義してしまえばクリアになる。

xだけを動かしたときのY_{xx'}=Y_{x, M_{x'}}の変化の仕方が自然直接効果で、x'だけを動かした場合が自然間接効果。非常にクリア。 pic.twitter.com/pxrIbjd5AA

タグ: 統計

posted at 22:19:42

黒木玄 Gen Kuroki @genkuroki

23年1月31日

#統計 do(X=x)というパールさん流の記号法を使うことと、YₓやZₓのようなpotential outcomesの確率変数をモデルの中で新たに定義して使うことはほぼ同等なのですが、媒介分析ではYₓのxとZₓにxを異なる値に設定できることが本質的で、そのような場合ではdo(X=x)では足りなくなります。 twitter.com/genkuroki/stat...

タグ: 統計

posted at 21:37:31

TaKu @takusansu

23年1月31日

@mamiananeko #超算数 掛け算の順序は、そもそも逆順は誤りという扱いです。
twitter.com/genkuroki/stat...
【できない子(=抽象化が苦手な子)に合わせて】とかは、後付けの理由でしかありません。
しいて言えば、「できない大人に合わせて」という方が適切でしょう。

タグ: 超算数

posted at 20:54:29

川端裕人 『ドードー鳥と孤独鳥』(国書刊 @Rsider

23年1月31日

あと、もう一つ付け加えるなら、「流行時(ウイルス排出している人の頻度が高い)」には、特に意義が大きい、ということ。

タグ:

posted at 20:39:47

黒木玄 Gen Kuroki @genkuroki

23年1月31日

#統計

⭕️統計分析をするときには、最初にモデルが何であるかをできるだけわかりやすく記述する

という習慣が広まれば、

⭕️P値の誤用も減り、

さらに

⭕️統計的因果推論の仕組みを理解する人も増える

ように思えます。

タグ: 統計

posted at 20:36:31

黒木玄 Gen Kuroki @genkuroki

23年1月31日

#統計 このように、背景にある統計モデルの全体を隠して、パラメータに関する帰無仮説のみを表に出して強調するスタイルは「統計的有意性とP値に関するASA声明」 www.biometrics.gr.jp/news/all/ASA.pdf では明瞭に否定されており、多くの教科書がそれによって「誤用を勧めている」と判定されることになります。

タグ: 統計

posted at 20:36:30

黒木玄 Gen Kuroki @genkuroki

23年1月31日

#統計

❌P値がある閾値未満になったら、帰無仮説と現実での観測データが矛盾すると考えて、帰無仮説を捨てる

のように説明している教科書は、「統計的有意性とP値に関するASA声明」 www.biometrics.gr.jp/news/all/ASA.pdf の立場では酷く間違っており、P値の誤用を勧めていることになるわけです。続く

タグ: 統計

posted at 20:36:29

黒木玄 Gen Kuroki @genkuroki

23年1月31日

#統計 因果推論と無関係の「統計的有意性とP値に関するASA声明」 www.biometrics.gr.jp/news/all/ASA.pdf も、P値の小ささは

❌帰無仮説と現実での観測データが両立しない程度

ではなく、

⭕️統計モデル(帰無仮説及びそれ以外の前提を全てふくむ)と現実での観測データが両立しない程度

を意味すると説明。続く

タグ: 統計

posted at 20:36:29

Kouji Ohnishi 大西浩次 @koujiohnishi

23年1月31日

10/10
PS:ちなみに私は #分光装置 を持ち込み、人工 #火球#発光メカニズム の解明として、「#はやぶさ」カプセルの温度を測定していた。上空で流星発光的なスペクトルであったカプセルが、高度70km以下で、ほぼ黒体放射で近似でほぼ解析でき、最高で3000K近い高温になったことなどがわかった。

タグ: 分光装置 火球 発光メカニズム

posted at 20:30:04

Kouji Ohnishi 大西浩次 @koujiohnishi

23年1月31日

9/n
この瞬間、「#はやぶさ」が 無事カプセルを送り届けたことを確信した。いま、 飛行機の中でカプセル回収のニュースを聞いた。 カプセルの中に、「#イトカワ」の岩石が入っているかどうか、いずれにしても「はやぶさ」の最期は、日本の惑星探査の新しいスタートである(帰国中の機内で書いた原稿)。 pic.twitter.com/mlzuovEVtb

タグ:

posted at 20:30:03

Kouji Ohnishi 大西浩次 @koujiohnishi

23年1月31日

8/n
「(#はやぶさ)カプセルにぶつかるな」という声が聞こえた瞬間、 本体がオレンジ色にフラッシュしてスーッと消えていった。それまでの時間わずか1分弱ほど、上空約 60 km 付近で本体は蒸発した。カプセルは尾を引 きながらさらに 10 秒ほど飛び続け、ほぼ予測位置で見えなくなった。 pic.twitter.com/jpWyNWNzOF

タグ:

posted at 20:30:01

Kouji Ohnishi 大西浩次 @koujiohnishi

23年1月31日

7/n
そして 運命の6月13日、南天の南十字星が輝く星空の下、22 時 51 分、大気圏に突入した「#はやぶさ」本体とカプセルが発光を初めてわずか数秒後、緑色に輝く「はやぶさ」本体が明るくバーストし、 無数の破片を撒き散らした。そのわずか手前に、 小さな「はやぶさ」カプセルが飛んでいる。 pic.twitter.com/URrclfhw5L

タグ:

posted at 20:30:00

Kouji Ohnishi 大西浩次 @koujiohnishi

23年1月31日

6/n
「はやぶさ」がカプセルを地球に送り届けるために、「はやぶさ」本体も大気圏に突入することになった。国立天文台観測隊は、「#はやぶさ」の大気圏突入に伴う流星的発光現象の観測のため、高感度ビデオカメラや #分光装置 などを予想発光点に最も近いオーストラリア南部の町に持ち込んだ。 pic.twitter.com/7uWIqzLlVs

タグ: 分光装置

posted at 20:29:59

Kouji Ohnishi 大西浩次 @koujiohnishi

23年1月31日

5/n
事実、2006 年 1 月末に臼田の64mアンテナで通信が再開し、はやぶさの姿勢を安定化させることができた。しかし、この作業中に地球帰還への軌道修正が間に合わなくなり、2007年の帰還予定 が2010年に延びたのだ。それと同時に、姿勢制御用燃料の使えない pic.twitter.com/kvZEIGfWuA

タグ:

posted at 20:29:58

Kouji Ohnishi 大西浩次 @koujiohnishi

23年1月31日

4/n
直後の研究会でJAXA の吉川真さんに「たいへんなことになりましたね」と言ったところ「大丈夫、直前のスピン状態からきっと1 〜 2 か月で捕まるよ」という。燃料漏れによって異常回転した「#はやぶさ」の回転軸がコマの運動のように歳差運動しているので、必ずアンテナが地球を向くというわだ。 pic.twitter.com/KDkiduyVT0

タグ:

posted at 20:29:57

Kouji Ohnishi 大西浩次 @koujiohnishi

23年1月31日

3/n 最後の仕事は、無事に「カプセル」を地球に送り届けることだった。

「#はやぶさ」は 2005 年 9 月、小惑星「#イトカワ」に到着、2 か月間の詳細な科学観測の後、11 月「イトカワ」に着陸した。しかし、 この直後、姿勢制御用の燃料が漏れ出し、姿勢が 乱れて探査機が行方不明になってしまった。 pic.twitter.com/SZK2gph8pE

タグ:

posted at 20:29:56

Kouji Ohnishi 大西浩次 @koujiohnishi

23年1月31日

2/n 「#はやぶさ」は、小惑星「イトカワ」の岩石を持って帰ってくる史上初のサンプルリターンを目指して、イオンエンジンを使った惑星間航行、各種センサーを使った自律航法など、数々の工学技術の検証と小惑星の科学観則を目指した。そうしてこの日、 7 年の旅を終えて、ついに地球に帰ってきたのだ。 pic.twitter.com/wzNOqDWldy

タグ:

posted at 20:29:55

Kouji Ohnishi 大西浩次 @koujiohnishi

23年1月31日

#ジャポニカ学習帳 #宇宙編「はやぶさ*」物語1/n

2010年6月13日22時51分、我々はオーストラリア南部の小さな町、Coober Pedy郊外で「#はやぶさ」とその カプセルを待っていた。「はやぶさ」は、2003 年 5 月 9 日 に打ち上げられた小惑星探査機である。 twitter.com/koujiohnishi/s...

タグ: ジャポニカ学習帳 宇宙編

posted at 20:29:54

黒木玄 Gen Kuroki @genkuroki

23年1月31日

#統計 potential outcomeを「欠測値」というイメージで捉えるよりも、「potential outcomeが実現値と異なる値に対してどのように決まるかを記述するモデルは何であるか?」のようにモデルの方を重視する方が事故が起こり難いと思う。

現実と異なる状況でどうなるかはモデルを使って推測するしかない。

タグ: 統計

posted at 20:23:16

川端裕人 『ドードー鳥と孤独鳥』(国書刊 @Rsider

23年1月31日

ほんと、ゼロか1かの「意味あり」「意味なし」論はどうかしてほしい。といつも思う。

タグ:

posted at 20:22:46

川端裕人 『ドードー鳥と孤独鳥』(国書刊 @Rsider

23年1月31日

要はCOVID-19の「誰がウイルスを排出しているか分からない特性」と、感染力の強さなどが相まって、「みんなマスクする」ことでの感染防御効果が検出できるレベルになった、みたいなイメージ。無論マスクだけで解決する問題じゃないが「意味無し」ではないのです。いろいろ組み合わせて立ち向かうのです

タグ:

posted at 20:21:56

黒木玄 Gen Kuroki @genkuroki

23年1月31日

#統計 やっていることが対称でない点を裏に隠して、ルービン先生側のスタイルで「欠測値」というイメージでpotential outcomeについて説明した上で、パールさん流とルービン先生流の両方を使えばよい、と言うのはちょっとまずい感じ。

非対称性の問題については causality.cs.ucla.edu/blog/index.php... を参照。 twitter.com/genkuroki/stat...

タグ: 統計

posted at 20:17:56

川端裕人 『ドードー鳥と孤独鳥』(国書刊 @Rsider

23年1月31日

未だに2020以前の主にインフルでのマスクの効果が芳しくない研究を引いて、マスク意味無しみたいな人がいてげんなりするけど、それってどうなの?と思う人は、岩田さんの連ツイで概念的には分かるはず。要は、「コロナの時代のユニバーサルマスキング」には十分な意義がある事は、既知だとしてよいかと twitter.com/georgebest1969...

タグ:

posted at 20:17:50

黒木玄 Gen Kuroki @genkuroki

23年1月31日

#統計 しかし、もっと易しく書かれた以上の意味では「教育的でない」教科書があってもいいかも。

タグ: 統計

posted at 20:11:38

黒木玄 Gen Kuroki @genkuroki

23年1月31日

#統計 解答例が載っておらず、Googleで検索して見つかる解答例が少し不適切な内容になっている場合もある点は非常によいと思いました。

正しいかどうかの判断の全責任が自分自身にある状況を作ることは、論理的にややこしいことを理解するときには結構重要だと思います。

タグ: 統計

posted at 20:08:48

黒木玄 Gen Kuroki @genkuroki

23年1月31日

#統計 そうならないようにするために役に立つ問題(既出のStudy questions)が『入門統計的因果推論』には載っている点は非常によいと思いました。

数学的実力が十分なら、条件付き独立性の定義に戻った直接の計算でも易しく解けます。

タグ: 統計

posted at 20:08:47

黒木玄 Gen Kuroki @genkuroki

23年1月31日

#統計 続き。d-separationやらバックドア基準の類を使わなくても、

条件付き独立性の定義に戻って単に地道な計算をしても欲しい結果が得られること

を理解する前に、d-separationやらバックドア基準の「やり方」を覚えて使うと、真っ当な理解が不可能になります。続く

タグ: 統計

posted at 20:08:46

黒木玄 Gen Kuroki @genkuroki

23年1月31日

#統計 算数や数学において、

「全部数えても解ける」とか「定義に戻って面倒な計算をしても求まる」のようなことを理解している人が便利な近道として賢い方法も使うようになる

のと、

最初から天下り的に説明された「やり方」に従う

のでは、理解度に天と地程度の差が生じます。

DAGの話も同じ。 twitter.com/genkuroki/stat...

タグ: 統計

posted at 20:08:45

知念実希人 物語り @MIKITO_777

23年1月31日

あのね、肝障害のリスクがない薬剤の方が少ないんですよ……
ほとんどの漢方薬だって肝障害のリスクは存在するんです。

あと『カロナールに含まれているアセトアミノフェン』って、それが主成分です……

何が言いたいんだ……

news.yahoo.co.jp/articles/6aee5...

タグ:

posted at 20:07:00

ポッポ店長(おもちゃのポッポ) @poppotencho

23年1月31日

@sioagisoluto なるほど初代のトマトを貰う話し
今のガンダム は深いなー pic.twitter.com/mQbJsfL6cQ

タグ:

posted at 20:05:13

闇のapj @apj

23年1月31日

「彼らの計画を阻止できるよう、よろしくお願いいたします」の「彼ら」のうちの一人の住所が書いてあったのを読んで「お客様差出(受取り)のものと判明」って,読解力に問題ありすぎだろ牛込郵便局はwデムパ入ってる内容とはいえ,どこをどう読んだらそう読めるんだよ。 twitter.com/apj/status/162... pic.twitter.com/IN4xuJvLjV

タグ:

posted at 19:23:09

がっでむ @goddem123

23年1月31日

補足すると、ウルティマオンラインはすでにあった時期のことです。ただあれもパッケージ版があって、何よりウルティマはすでに文化になっているタイトルでしたから。(除:日本・・・かなしい

タグ:

posted at 19:18:53

闇のapj @apj

23年1月31日

これ,郵便局のオペレーションとして怖すぎませんか。封筒に差出人がなく,宛先に不備があったら,確認のため開封されて(ここまでは法的にOK),たまたま中に住所らしきものが書いてあったら,差出人受取人とは関係なくそこに配達されて通信内容がバレるってことですよ。 twitter.com/apj/status/162...

タグ:

posted at 19:07:13

闇のapj @apj

23年1月31日

情報追加。やらかしは牛込郵便局。問い合わせたら「差出人が無かったので開封し中にあった住所の人物が差出人と判断した」そうで,それがいつもの対応だとか。通信の秘密を不注意で郵便局が第三者にバラした事案に発展することが確定。 twitter.com/apj/status/162...

タグ:

posted at 19:05:37

がっでむ @goddem123

23年1月31日

でも最初からネット上のサービスとして展開されるゲームの出現は当時は考えてなかったなあ。
最初から媒体に残さない前提で、その体験を買うんだ、って言うのはわかるんですが、そうやって課金させ続けるモデルって最終的には成立しないと思うんだけどなあ。

タグ:

posted at 18:23:37

がっでむ @goddem123

23年1月31日

個人的には90年代から「古いゲームが残らないことの問題」を訴えていたので(そのために、某社公式BBSでエミュレータを合法的に活用できるべき、と言って当時SQ在籍の人に睨まれた)、ProjectEGG等が存在する現在はだいぶマシになった世界なのです。

タグ:

posted at 18:22:54

siro @siro_jade

23年1月31日

@sioagisoluto 第8話
ジオンのバムロ&コムは、ペルシア&コーリー母子に救援物資を乗機ルッグンから投下してやる
彼等の目的はある意味ペルシア&コーリー殺害なのに(木馬を撃墜すると自動的にそうなる)

そのルッグンもやがて撃墜され
バムロ&コムは先程の救援物資を使ってペルシアに手当てされる
鳴呼ガンダム

タグ:

posted at 18:01:12

がっでむ @goddem123

23年1月31日

知らないゲームのサ終のお知らせが流れてくる度に、「ソシャゲやスマホアプリでなくパッケージで売ってれば。オフラインでも遊べれば」と思ってしまう。

マジで虚無しか残らんでしょ
作ってた人らも虚しくないのかね。
ゲームが虚業になってしまうの。

タグ:

posted at 17:56:05

Dr. KID @Dr_KID_

23年1月31日

ガトーフェスタハラダのラスクは、とても罪深い☺️ pic.twitter.com/XRywDsTjAw

タグ:

posted at 17:20:37

サンピアン @sunpian_nagano

23年1月31日

Xシリーズを語ろうの動画やボストンの比較動画でも登場したWX106Wがご成約となりました🙇‍♂️

こちらもYouTubeをご覧いただいたお客様でした!!

この度はお買い上げいただきまして誠にありがとうございました!! pic.twitter.com/K7x2qcHF3m

タグ:

posted at 16:37:02

積分定数 @sekibunnteisuu

23年1月31日

mobile.twitter.com/ajb401xx/statu...

デタラメ算数を信じてしまっている。こういう人を減らすためにも、SNSで話題にすることは重要。

タグ:

posted at 14:49:18

闇のapj @apj

23年1月31日

まあでもそれが原因で右翼団体に我々をターゲットとする怪文書が送られているというのが発覚したわけだから,郵便局員さんのしくじりグッジョブ!ってとこですね我々にとっては。まあ郵便局のどっかで以後気をつけろという説教ぐらいは行われてるかもしれませんが……。 twitter.com/apj/status/162...

タグ:

posted at 13:25:34

闇のapj @apj

23年1月31日

開封して差出人・受取人住所が無いか確認し,あればいずれかに送るというのが通常のオペレーションのところ,「ターゲット」に送っちゃったってところが郵便法的にまずそう。ただ,受取人が受け取った郵便物の中を見た後どうするかは郵便法関係ないでしょうし……。 twitter.com/ankokudan/stat...

タグ:

posted at 13:18:49

非公開

タグ:

posted at xx:xx:xx

非公開

タグ:

posted at xx:xx:xx

Karandeep Singh @kdpsinghlab

23年1月31日

Lots more to learn and share. Resources I have found super helpful:

- docs.julialang.org/en/v1/manual/n...
- dataframes.juliadata.org/stable/
- aog.makie.org/stable/generat...
- www.manning.com/books/julia-fo...
- juliadatascience.io

and many others!

Thanks to the language and package devs!

タグ:

posted at 12:45:08

Karandeep Singh @kdpsinghlab

23年1月31日

In Julia, unquoted variable names (eg Age) are called symbols and always preceded by a colon (eg :Age). Expressions also have a shorthand involving a colon, eg :(1+1) is a quoted expression.

So you can generally differentiate NSE from SE in Julia.

タグ:

posted at 12:39:30

Karandeep Singh @kdpsinghlab

23年1月31日

A quick word on non-standard evaluation (NSE): this is a common programming pattern in tidyverse R and is controversial bc it’s not always clear whether a function expects NSE (eg Age) or SE (eg “Age”) and this introduces the need for quasiquotation, etc.

タグ:

posted at 12:39:29

Karandeep Singh @kdpsinghlab

23年1月31日

Also, the `begin` and `end` keywords are Julia’s equivalent for curly braces in R. Curly braces serve a different purpose in Julia.

Even tho I show code as aligned, Julia doesn’t enforce any whitespace rules (unlike Python).

タグ:

posted at 12:37:32

Karandeep Singh @kdpsinghlab

23年1月31日

The `@` at the beginning of @pipe and @chain indicate that these are actually macros and not regular functions.

Unlike regular functions, macros are able to access the call and calling environment, which gives them superpowers.

タグ:

posted at 12:36:58

Karandeep Singh @kdpsinghlab

23年1月31日

Unlike the R 4.2 |> pipe, both of these pkgs can re-use the placeholder (like magrittr).

What if you don’t want to do_that() anymore?

Removing this is fine for Chain.jl. With Pipes.jl, commenting this out will leave a hanging |> at the end, so my preference is to use Chain.jl.

タグ:

posted at 12:35:44

Karandeep Singh @kdpsinghlab

23年1月31日

Chain.jl is emerging as the more popular choice. To see why, compare the syntax for Pipes vs. Chain.

Pipes.jl

@pipe a |>
do_this |>
do_that(1, _, _)

Chain.jl

@chain a begin
do_this
do_that(1, _, _)
end

タグ:

posted at 12:34:55

Karandeep Singh @kdpsinghlab

23年1月31日

Two competing pipes have emerged from other packages to fill this gap: one from Pipes.jl and one from Chain.jl.

Pipes.jl uses the same |> and adds a _ placeholder.

Chain.jl uses the _ placeholder but no pipe operator.

タグ:

posted at 12:32:37

Karandeep Singh @kdpsinghlab

23年1月31日

Let’s move onto pipes, and then we’ll talk about non-standard eval.

Julia comes with a built-in pipe: |>

Recognize it? Yup, same as the R native pipe, which they both borrowed from F#.

Just like in R 4.1, the native Julia pipe doesn’t have a placeholder.

タグ:

posted at 12:31:46

Karandeep Singh @kdpsinghlab

23年1月31日

In Julia, *every* function is *automatically* vectorized by adding a period to it. For operators, the period goes before the operator (.+) and for other functions, it goes after the function.

In Julia, ifelse() isn’t vectorized, but ifelse.() is.

Compiler magic 🌟.

タグ:

posted at 12:30:15

Karandeep Singh @kdpsinghlab

23年1月31日

However, not all functions are vectorized in R. For example, compare if() vs ifelse(): the first is not vectorized while the second is. lapply() and map() exist to vectorize functions that aren’t vectorized.

タグ:

posted at 12:30:14

Karandeep Singh @kdpsinghlab

23年1月31日

Also, the `+` function has a higher precedence than the `:` in Julia, so I had to surround the 1:10 in parentheses to make sure it got applied in the correct order.

As an R user, you may not be used to thinking about scalars bc everything is a vector in R.

タグ:

posted at 12:28:25

岩田健太郎 K Iwata, MD, M @georgebest1969

23年1月31日

9. 現段階ではマスクによる成長、学習、コミュニケーションの阻害懸念は実証されていないが(小児含む)、こういう懸念事項も実証的に検証するのが大事で「懸念があるからマスクはダメ」と結論づけてはいけない。学校でのマスクの感染防御効果はNEJMの論文で示されたとおり。

タグ:

posted at 12:24:07

岩田健太郎 K Iwata, MD, M @georgebest1969

23年1月31日

は極めて小さかったのだけど、コロナ以降はそのメリットは十分にある(正しいセッティングでは)。

8.病院とかではN95の活用も検討されるが最近のAnnalsの論文でも不織布マスク以上の優位性は示せず、使用場所は限定されるかも。街を歩くときにN95はナンセンス(しんどい)。

タグ:

posted at 12:24:06

岩田健太郎 K Iwata, MD, M @georgebest1969

23年1月31日

飛んでくるリスクは軽減されるのでこれがメリットになる。これがユニバーサルマスキングの概念。ちなみに、「感染者が不織布マスク」の概念はコロナ以前からあり、結核患者が個室からでて検査を受けるときなどには活用されてきた。

7.というわけで、コロナ以前の世界ではマスクの感染防護メリット

タグ:

posted at 12:24:05

岩田健太郎 K Iwata, MD, M @georgebest1969

23年1月31日

少なくともぼくは診療時はマスクしてた。

5.ところが、新型コロナは無症状の感染者が多く、感染力もインフルより強く、大量の患者が街を歩いているのでマスクの僅かな防護効果の相対的なメリットが嵩上げされる。が、これだけでは効果不十分。

6.ただし、感染者がマスクをすることで病原体が

タグ:

posted at 12:24:05

岩田健太郎 K Iwata, MD, M @georgebest1969

23年1月31日

3.よって、2020年までは外出時にマスクを着けるメリットは非常に小さく、臨床試験(コホート研究がメイン)でもあまり効果を示せなかった。よって推奨度は低かった。

4.が、病院では特に外来で呼吸器感染症の患者は多く、面と向かって咳やくしゃみが来ることも多くて、診療時にマスクはデフォルト

タグ:

posted at 12:24:04

岩田健太郎 K Iwata, MD, M @georgebest1969

23年1月31日

マスクについて簡単にまとめておくと、

1.不織布マスクは隙間が多く、感染者が周りに病原体を撒き散らさない効果は大きかったが、周囲が感染をブロックする効果は乏しかった。

2.インフルなど典型的呼吸器感染は有症状からの感染が多く、しかも症状きつくて街を歩いてる感染者は相対的に少数

タグ:

posted at 12:24:04

Karandeep Singh @kdpsinghlab

23年1月31日

If you want to vectorize the operation by “broadcasting” the scalar 1 into a vector of length 10 containing all 1s (aka R’s vector recycling), you have to do this explicitly by adding a period. Like this:

(1:10) .+ 1

This produces the expected output.

タグ:

posted at 12:21:05

Karandeep Singh @kdpsinghlab

23年1月31日

Ok now one weird thing (for R users).

In R, if you do 1:10 + 1, this returns a new vector containing the numbers 2:11.

In Julia, (1:10) + 1 produces an error. Why? Because 1:10 and 1 are different lengths so they can’t be added element-wise.

タグ:

posted at 12:21:04

Karandeep Singh @kdpsinghlab

23年1月31日

If you’ve ever written a for-loop over 1:length(a) where `a` turned out to have a length of zero, you’ll love this. No need for seq_along!

This is the topic of several StackOverflow topics, like this one:

stackoverflow.com/questions/6221...

タグ:

posted at 12:17:10

Karandeep Singh @kdpsinghlab

23年1月31日

A few final points on sequences/ranges. In R, if you write 8:4, this will return 8 7 6 5 4. In Julia, it will return an empty integer.

Why?

Because Julia assumes a default step of +1, and if you want to change it, you can using 8:-1:4, which counts by -1 from 8 to 4.

タグ:

posted at 12:15:37

Karandeep Singh @kdpsinghlab

23年1月31日

In Julia, if you write `a = 1:10`, it'll print out 1:10 in the console without needing to do anything else.

If you want to suppress this behavior, you can add a semicolon at the end, as in `a = 10;`

タグ:

posted at 12:13:59

Karandeep Singh @kdpsinghlab

23年1月31日

Another really minor but nice touch.

If you write `a = 1:10` in R and want to see the value of a in the console, you have to either separately write `a` on the next line or wrap the entire line in parentheses `(a = 1:10)`.

How about in Julia?

タグ:

posted at 12:13:58

Karandeep Singh @kdpsinghlab

23年1月31日

If you want to count up by 0.5, you have to switch over to using the seq() function in R, whereas in Julia you can use the from:by:to syntax. If you really prefer the seq() function, Julia has a range() function with identical functionality.

Here’s R syntax, then Julia. pic.twitter.com/FwwDLsiUFW

タグ:

posted at 12:11:21

Karandeep Singh @kdpsinghlab

23年1月31日

Also, despite the fact that I'm using a lot of collect() functions for Julia to show you values, in reality you almost never need this.

What if you want to count up by 1 over numeric vectors? Both the R and Julia syntax is identical.

But what if you want to count up by 0.5?

タグ:

posted at 12:11:19

Karandeep Singh @kdpsinghlab

23年1月31日

This is such a pain point in R that every data frame package has implemented their own helper function or keyword. Data.table uses .N for this, and tidyverse uses n().

Note also the use of the pipe in Julia. In reality, both Chain.jl and Pipes.jl provide a more useful pipe.

タグ:

posted at 12:07:42

Karandeep Singh @kdpsinghlab

23年1月31日

What if you want to retrieve the last 2 elements of a vector whose length you don't know in advance?

Here, the Julia syntax is lovely. It has a built in `end` word for referring to the last element. pic.twitter.com/SRB3j6c8qz

タグ:

posted at 12:07:41

Karandeep Singh @kdpsinghlab

23年1月31日

Julia also supports sequences using the `:` infix operator. To have them print out in Julia, you need to collect them bc Julia is lazy (like R but sometimes lazier!) and won't return the values until needed.

Also, note that vectors print vertically in Julia. pic.twitter.com/r03WUJHdow

タグ:

posted at 12:05:05

Karandeep Singh @kdpsinghlab

23年1月31日

That example brings up one thing I absolutely love about Julia. It's a sane language, by which I mean that it is a 1-indexed language.

I don't need to whip out a calculator to figure out how to generate starting or ending indices. In this way, it functions almost exactly like R.

タグ:

posted at 12:03:53

Karandeep Singh @kdpsinghlab

23年1月31日

Another difference: Julia treats single and double quotes differently (unlike R).

Strings are written like "this". Individual characters use single quotes.

Bc a string is a collection of characters, "this"[1] == 't' will return true, while "this"[1] == "t" will return false!

タグ:

posted at 12:02:49

Karandeep Singh @kdpsinghlab

23年1月31日

If you only wanted the distinguishable_colors() from the Colors package, you could also write

using Colors: distinguishable_colors

This would bring only that function into the namespace.

タグ:

posted at 12:02:48

Karandeep Singh @kdpsinghlab

23年1月31日

`import` loads the package under the name Colors. So to use the `distinguishable_colors()` function, I'd need to write Colors.distinguishable_colors() to access it.

`using` is the R equivalent of `library()` since it brings all of that package's functions into the namespace.

タグ:

posted at 12:00:26

Karandeep Singh @kdpsinghlab

23年1月31日

A couple of differences worth pointing out, which will be totally unsurprising to Python users.

There are two ways of loading Julia packages. If I wanted to use the Colors package, I could write:

import Colors

or

using Colors

タグ:

posted at 11:59:21

Karandeep Singh @kdpsinghlab

23年1月31日

Not only do you not need equiv of a remotes R package, you also don't need renv bc Julia comes with built-in environments.

Use the "activate ." function from within the Pkg console to activate a folder as your environment, which gets its own set of packages, similar to renv.

タグ:

posted at 11:57:57

Karandeep Singh @kdpsinghlab

23年1月31日

Even cooler? press "]" from the Julia console and the Pkg package launches its own console for managing packages (press backspace to exit). From this view, it's even easier to add packages.

To add the Colors package, just type:

(v1.8) pkg> add Colors

タグ:

posted at 11:55:52

Karandeep Singh @kdpsinghlab

23年1月31日

Julia natively takes pkg management much further than R. Want to install a package from GitHub? Easy, just add a url argument to the add function.

Pkg.add(url = "github.com/kdpsingh/TidyT...")

タグ:

posted at 11:55:28

Karandeep Singh @kdpsinghlab

23年1月31日

Let's start with packages.

Like R, Julia comes with a package manager that can be used to install pkgs from within the console (or REPL). The Pkg package isn't automatically imported in Julia but it's easy to do.

Both are different from Python's command line approach to pkgs. pic.twitter.com/oSFkOlUAW0

タグ:

posted at 11:53:44

Karandeep Singh @kdpsinghlab

23年1月31日

My lab is moving to #JuliaLang, and I’ll be putting together some R => Julia tips for our lab and others who are interested.

Here are a few starter facts. Feel free to tag along!

Julia draws inspiration from a number of languages, but the influence of R on Julia is clear.

タグ: JuliaLang

posted at 11:53:42

名取宏(なとろむ) @NATROM

23年1月31日

@eclipsemode1 12. 日本においても都道府県別ではワクチン接種率と超過死亡は逆相関の傾向がありますが、日本でもドローンが新型コロナをばらまいているんですか?質問は12個です。とりあえず以上です。

タグ:

posted at 11:35:35

名取宏(なとろむ) @NATROM

23年1月31日

@eclipsemode1 10. 「ファーウェイ社にいる人民解放軍がドローンを飛ばし高度1万m以上の上空からコロナをばら撒」いているとどのような方法でeclipsemode1さんは知ったのですか?また、証拠を提示できますか?

タグ:

posted at 11:34:40

名取宏(なとろむ) @NATROM

23年1月31日

@eclipsemode1 7. 「私がインフルエンザにかかったとき、タンポポ茶を飲んだらよくなった。タンポポ茶はインフルエンザに効く」という体験談は、タンポポ茶がインフルエンザに効果があるという証拠にならないことは同意できますか?

タグ:

posted at 11:32:46

Python Programming @PythonPr

23年1月31日

How to Download YouTube Videos using Python for Beginners
morioh.com/p/9044eb7c98c2...

#python pic.twitter.com/ZEolIFdmjV

タグ: python

posted at 11:20:31

非公開

タグ:

posted at xx:xx:xx

永遠の蒼 @sioagisoluto

23年1月31日

皆少ない食料を分配される中
パイロットのアムロはまともな食事を用意される気まずさ

老人が小さい子の食事を盗み食う余裕の無さ

それを見て子供に食事を分けようとする優しさ

そんなアムロにちゃんと食べろと説教するフラウ『だったらこんな所で食べさせるな!』と返すアムロ

ここ最高にガンダム pic.twitter.com/9yWbIfDj6X

タグ:

posted at 11:01:53

Tak itoshi @takitoshi

23年1月31日

Windows更新で数値計算結果が吹っ飛ぶ恒例のやつをしてしまった(n回目)。ちょっと目を離すと吹っ飛んでいるの何なんだ。。2歳児か。

タグ:

posted at 09:48:07

積分定数 @sekibunnteisuu

23年1月31日

娘さんが可哀そう。

バツにされることよりも、丸になり理解できなくなる方が可哀そう。

「これは採点が間違っているのだから、バツになっても気にするな。堂々とバツになれ」というのが親の役目。 twitter.com/ajb401xx/statu...

タグ:

posted at 09:31:37

桑満おさむ @kuwamitsuosamu

23年1月31日

うわあ、なんかすごいことになっている。 twitter.com/apj/status/162...

タグ:

posted at 09:00:55

癒される動物 @cutest_animal1

23年1月31日

みんなで仲良くおねんね pic.twitter.com/Yp98UomQHP

タグ:

posted at 08:12:37

Maryam Vaziri-Pashka @mvazirip

23年1月31日

The code for generating the stimuli from videos is on OSF (linked in the paper) if you are interested.

タグ:

posted at 06:13:28

Maryam Vaziri-Pashka @mvazirip

23年1月31日

The paper was nicely summarized in this news piece: medicalxpress.com/news/2023-01-m...

タグ:

posted at 06:13:27

Maryam Vaziri-Pashka @mvazirip

23年1月31日

What animal do you see in this video? With similar videos that isolate object movements, in a paper that just came out in #JNeurosci, Sophia Roberts @s_r_hamasaki, Leslie Ungerleider, and I explored what brain regions process movement cues from objects. www.jneurosci.org/content/43/4/621 pic.twitter.com/ijNvnqs0kc

タグ: JNeurosci

posted at 06:13:26

ねとらぼ生物部 @itm_nlabzoo

23年1月31日

この反応はうれしい

「猫は名前を呼んだら何回まで来てくれる?」試してみた いとおしい検証結果に「めっちゃめっちゃ可愛い」ともん絶 nlab.itmedia.co.jp/nl/articles/23... pic.twitter.com/GsW0UMO4Zr

タグ:

posted at 06:05:30

H0W_THlNGS_W0RK @HowThingsWork_

23年1月31日

Vantablack: This black coating holds an independently verified world record as the darkest man-made substance known. It absorbs up to 99.96 percent of visible light. ◼️ pic.twitter.com/zdpOQR4RVJ

タグ:

posted at 05:03:17

黒木玄 Gen Kuroki @genkuroki

23年1月31日

#統計 たぶん、これから統計的因果推論について学ぶ人達の多くが、potential outcome Yₓ についての説明を見たときに、

 Xの実現値と異なるXの値についてYの値をどのように決めるのか?

と疑問に感じると思う。

その答え
twitter.com/genkuroki/stat...

タグ: 統計

posted at 03:22:36

黒木玄 Gen Kuroki @genkuroki

23年1月31日

手間的に1日2000円だと安過ぎる。桁が全然足りない。 twitter.com/eman1972/statu...

タグ:

posted at 03:17:12

黒木玄 Gen Kuroki @genkuroki

23年1月31日

#統計 potential outcome Yₓ の概念の説明の仕方に関する個人的な意見をさらに追加。

添付画像中のベン図もどきの図による説明は背景のモデルを曖昧にするので結構肝腎な点で分かり難いように思えます。

Xの実現値と異なるXの値についてYの値がどのように決まると考えるかをはっきり述べたい。 twitter.com/genkuroki/stat... pic.twitter.com/23sywBQUtD

タグ: 統計

posted at 03:10:13

Massimo @Rainmaker1973

23年1月31日

This requires a mandatory center of mass analysis

[📹 ellariya_bohdanova & karinasandovich: buff.ly/3Chdvot]
pic.twitter.com/U93pLU8A6J

タグ:

posted at 01:16:26

«< 前のページ1234567のページ >»
@genkurokiホーム
スポンサーリンク
▲ページの先頭に戻る
ツイート  タグ  ユーザー

User

» More...

Tag

» More...

Recent

Archive

» More...

タグの編集

掛算 統計 超算数 Julia言語 数楽 JuliaLang 十分 と教 モルグリコ 掛け算

※タグはスペースで区切ってください

送信中

送信に失敗しました

タグを編集しました