如何使用 jsl 選擇分位數範圍異常值的列嗨,JMP 團隊,
我計劃使用 Explore Outliers 進行自動異常值分析。 此自動化的目標是獲得一個整潔、易於查看的表格,以僅顯示具有異常值的行項目和列項目(這需要過濾掉那些非異常值列和行)。 以下以水處理為例,剔除沒有異常值的行項目。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Water Treatment.jmp" );
obj = dt << Explore Outliers(
Y( dt << Get Column Group( "Sensor Measurements" ) )
);
obj << Show only columns with outliers(1);
obj << Tail Quantile( 0.1 );
obj << Q(3);
obj << Quantile Range Outliers;
obj << ColorCells(dt << Get Column Group( "Sensor Measurements" ));
obj << SelectRows(dt << Get Column Group( "Sensor Measurements" ));
obj << ExcludeRows(dt << Get Column Group( "Sensor Measurements" ));
dt << select where( Excluded(Row State()) != 1 );
dt << Delete rows;
問題如何使用jsl程式碼過濾掉非異常值列?

問候,
XH低
自動化和腳本編寫視窗回覆:如何使用 jsl 選擇分位數範圍異常值的列偉大的!! 現在可以了。
謝謝吉姆。

回覆:如何使用 jsl 選擇分位數範圍異常值的列預設情況下,JMP 15 中探索離群值平台的輸出僅顯示具有離群值的欄位。我提供的腳本假定顯示指定用於分析的所有列。我修改了程式碼以強制顯示所有列,以便正確填充“allEvaluatedList”。我在 JMP 15 中測試了程式碼,iit 現在可以工作。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Water Treatment.jmp" );
obj = dt << Explore Outliers( Y( dt << Get Column Group( "Sensor Measurements" ) ) );
obj << Show only columns with outliers( 1 );
obj << Tail Quantile( 0.1 );
obj << Q( 3 );
obj << Quantile Range Outliers;
obj << ColorCells( dt << Get Column Group( "Sensor Measurements" ) );
obj << SelectRows( dt << Get Column Group( "Sensor Measurements" ) );
obj << ExcludeRows( dt << Get Column Group( "Sensor Measurements" ) );
dt << select where( Excluded( Row State() ) != 1 );
dt << Delete rows;
obj << Show only columns with outliers( 0 );
allEvaluatedList = Report( obj )["Quantile Range Outliers", String Col Box( "Column" )] << get;
obj << Show only columns with outliers( 1 );
colList = Report( obj )["Quantile Range Outliers", String Col Box( "Column" )] << get;
For( i=1, i <= N Items(allEvaluatedList), i++, col=allEvaluatedList[i];
If( Contains( colList, col ) == 0 ,
dt << delete columns( col )
)
);
回覆:如何使用 jsl 選擇分位數範圍異常值的列嗨吉姆,
感謝您的代碼。
我嘗試了上面的程式碼,我的 JMP15 不支援 For Each()。 我對 For Each 進行了一些更改為 For 循環。
但仍無法刪除非異常值列。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Water Treatment.jmp" );
obj = dt << Explore Outliers( Y( dt << Get Column Group( "Sensor Measurements" ) ) );
obj << Show only columns with outliers( 1 );
obj << Tail Quantile( 0.1 );
obj << Q( 3 );
obj << Quantile Range Outliers;
obj << ColorCells( dt << Get Column Group( "Sensor Measurements" ) );
obj << SelectRows( dt << Get Column Group( "Sensor Measurements" ) );
obj << ExcludeRows( dt << Get Column Group( "Sensor Measurements" ) );
dt << select where( Excluded( Row State() ) != 1 );
dt << Delete rows;
allEvaluatedList = Report( obj )["Quantile Range Outliers", String Col Box( "Column" )] << get;
obj << Show only columns with outliers( 1 );
colList = Report( obj )["Quantile Range Outliers", String Col Box( "Column" )] << get;
For( i=1, i <= N Items(allEvaluatedList), i++, col=allEvaluatedList[i];
If( Contains( colList, col ) == 0 ,
dt << delete columns( col )
)
);
非離群值列仍然存在於下面的資料表中。

我錯過了什麼嗎?
回覆:如何使用 jsl 選擇分位數範圍異常值的列我在腳本底部添加了幾行程式碼,用於刪除沒有異常值的列。

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Water Treatment.jmp" );
obj = dt << Explore Outliers( Y( dt << Get Column Group( "Sensor Measurements" ) ) );
obj << Show only columns with outliers( 1 );
obj << Tail Quantile( 0.1 );
obj << Q( 3 );
obj << Quantile Range Outliers;
obj << ColorCells( dt << Get Column Group( "Sensor Measurements" ) );
obj << SelectRows( dt << Get Column Group( "Sensor Measurements" ) );
obj << ExcludeRows( dt << Get Column Group( "Sensor Measurements" ) );
dt << select where( Excluded( Row State() ) != 1 );
dt << Delete rows;
allEvaluatedList = Report( obj )["Quantile Range Outliers", String Col Box( "Column" )] << get;
obj << Show only columns with outliers( 1 );
colList = Report( obj )["Quantile Range Outliers", String Col Box( "Column" )] << get;
For Each( {col, i}, allEvaluatedList,
If( Contains( colList, col ) == 0,
dt << delete columns( col )
)
);