回复:Col Median(和其他):添加“Where”選項 - 狀態更改為:已確認你好@hogi , 謝謝你的建議! 我們已收到您的請求並將予以考慮。
回复:Col Median(和其他):添加“Where”選項 - 狀態更改為:Investigating回复:Col Median(和其他人):添加“Where”選項 - 狀態更改為:我們喜歡它! (在隊列中)@hogi隨著我們致力於改進 Where() 子句在整個 JMP 中的使用方式,我們正在密切關注這一點。感謝您的建議!
回复:Col Median(和其他):添加“Where”選項謝謝 :)
Col Median(及其他):新增「Where」選項很酷的新功能
☑ 可以幫助很多使用者!
刪除一個“bug”
很高興擁有
無人需要它
#myTop10_2022
有一組帖子詢問如何限制 列...聚合 特定子集的函數。
計算列平均值,同時限制使用的觀測值
JMP10:Col Max() 和 Col Min() 函數傳回排除行中的數據
列函數和行狀態
如何使用具有“where”條件的 Col 最大公式
排除公式中的數據
應用案例:
- 排除 rows from the aggregation:
Col Max(if(not(excluded()), :weight,.),: sex)
or even shorter (if one doesn't need values in the excluded rows);
Col Max(:weight, :sex, :excluded())
- Benchmark some data with a reference data set (country A in 這 post)
:data / Col Maximum(if(:country="A", :data,.))
如在上面的範例中所看到的,簡單的解決方案是Col xyz聚合內的If語句:
col Mean( if(:sex=="M", :weight,.), :age);
col Mean( if(not(excluded()), :weight,.), :age)
問題:
此方法非常慢 - 如果子集if條件包含字串比較:
我如何使用 Col-Maximum-Formula-where/M78599
然後,時間與行數呈現二次方關係,即使對於只有幾千個條目的小型資料集,計算也需要幾秒鐘。
對於具有數百萬個條目的資料集,這將需要幾個月的時間(!!!) - 但會因逾時而停止並彈出錯誤訊息。不太好!
我的願望:
修復錯誤
更好的是:
為Col xyz聚合提供附加where選項
- 它自動修復了計時問題:首先限制資料集,然後應用聚合(--> 更快,即使很酷的「col...」加速有一個錯誤)
- 這使得子集定義更容易,
而不是 (*),您只需要:
col Mean(:weight, :age, where(:sex=="M"))
col Mean(:weight, :age, where(not(excluded())))
計時範例,從此處複製

更正版本 - 在上一個版本。版本螢幕截圖顯示 [ms] 而不是 [s]
更多願望提交者
自動化和腳本編寫基礎資料分析與建模資料混合與清理數據探索和視覺化大規模客製化分享和交流成果回覆:Col Median(和其他):新增“Where”選項在 Jmp 的未來版本中可用之前,可以透過解決方法將 col 聚合速度加快幾個數量級
將資料類型變更為數字 - 或使用數字公式列。
https://community.jmp.com/t5/Discussions/Tips-and-Tricks-best-practice-with-JMP-JSL/td-p/662686
回覆:Col Median(和其他):新增“Where”選項謝謝@SamGardner 、 @Sarah-Sylvestre ,它現在在 JMP18 中可用:)
在將狀態變更為「已交付」之前,能否請您檢查一下此程式碼片段中的「Where」的用法是否類似於「tend」?
與原來的方法相比極度慢:(
dt = Open( "$SAMPLE_DATA/Airline Delays.jmp" );
Print("old aproach");
t0 = hptime();
New Column( "max - 1st of month",
Formula( Col Maximum( if(:Day of Month == 1 , :Arrival Delay,.), :Month) )
);
dt << run formulas();
show((hp time()-t0)/1000000); // 0.5s
Print("new aproach - with Where");
t0 = hptime();
New Column( "max - 1st of month",
Formula( Col Maximum( :Arrival Delay, :Month, Where( :Day of Month == 1 ) ) )
);
dt << run formulas();
show((hp time()-t0)/1000000); // 140s
回覆:Col Median(和其他):新增“Where”選項Print("new aproach - with Where, semi-bugfix");
t0 = hptime();
myWhere = Where( :Day of Month == 1 ) ;
Eval (Eval Expr(New Column( "max - 1st of month",
Formula( Col Maximum( :Arrival Delay, :Month, Expr(myWhere) )
))));
dt << run formulas();
show((hp time()-t0)/1000000); // 40s - better but still way too slow ...回覆:Col Median(和其他):新增“Where”選項啊,還沒有用:(
Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Column( "max - 1st of month",
Formula( Col Minimum( :weight, :sex, Where( :age ==17 ) ) )
);