を制限する方法について質問のある一連の投稿があります。列 ... 集計特定のサブセットに機能します。
https://community.jmp.com/t5/Discussions/Compute-Column-Mean-while-restricting-observations-used/mp...
https://community.jmp.com/t5/Discussions/JMP10-Col-Max-and-Col-Min-functions-returned-the-data-from/...
https://community.jmp.com/t5/Discussions/Col-Functions-and-Row-States/td-p/351705
https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/mp/34840
https://community.jmp.com/t5/Discussions/Col-Functions-and-Row-States/mp/351705
https://community.jmp.com/t5/Discussions/Exclude-data-in-formula/td-p/512366
適用例:
- 除外除外集計からの行:
Col Max(if(not(excluded()), :weight,.),: sex)
またはさらに短い(除外された行に値が必要ない場合);
Col Max(:weight, :sex, :excluded())
- 参照データ セット (国 Aこれ役職)
:data / Col Maximum(if(:country="A", :data,.))
上記の例でわかるように、簡単な解決策はもしも中の発言列 xyz集約:
col Mean( if(:sex=="M", :weight,.), :age)
col Mean( if(not(excluded()), :weight,.), :age)
問題:
アプローチは非常に遅いです - サブセットの場合もしも-状態が含まれています文字列比較:
https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/mp/578576/highlight/true#M78599
次に、時間は行数に応じて二次的にスケーリングされ、わずか数 1000 エントリの小さなデータ セットの場合でも、計算に時間がかかります。秒.
数百万のエントリを持つデータセットの場合、月(!!!) - しかし、タイムアウトによって停止され、エラー メッセージが表示されます。 よくない!
私の願い:
バグを修正する
さらに良い:
追加を提供するどこオプション列 xyz凝集
- これにより、タイミングの問題が自動的に修正されます。最初データセットを制限し、集計を適用します (--> クールな "col..." スピードアップにバグがあっても、はるかに高速です)
- これにより、サブセットの定義が容易になり、
(*) の代わりに、次のものが必要です。
col Mean(:weight, :age, where(:sex=="M"))
col Mean(:weight, :age, where(not(excluded())))
からコピーしたタイミングの例https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/mp/578576/highlight/true#M78599
