120萬行x 16列
環境溫度列顯示了許多觀察結果(按天),這些觀察結果在圖形構建器中位於框和晶須頂部尾部的上方,被分類為離群值。 不幸的是,但這很可能是由於環境溫度測量探針在行駛中的車輛上的放置。
目標是在使用神經網絡對數據進行建模以將小部件A與小部件B的性能進行比較之前,正確識別和抑制具有環境溫度異常值的數據行。
我在這裡讀了一些線程,但是找不到與解決方案類似的問題。
輕輕鬆松
調出離群值框
將光標拖到所有異常點上,這將在數據表中選擇所有異常點。
現在轉到數據表中的RowState列,然後轉到已選擇的行之一。
將鼠標懸停在所選行上時,右鍵單擊鼠標,然後選擇“排除”
所有選定的行將被排除
您可能要選擇“隱藏和排除”
你好 @ 4MUL8R
我曾經寫過一個腳本,如果行在任何變量的任何組中都是異常值,則將它們指定為專用行。我已將其更新為在一次專欄和幾列溫度中包括不同的日期。它會產生一個新的二進制列,該列指示每個原始列的異常值,另外一個二進制列指示該觀察值在任何變量中是否為異常值。
讓我們知道它是否有效。
羅恩
Names Default To Here( 1 );
// make a sample data table
dt = New Table( "Data",
add rows( 10000 ),
New Column( "it", Numeric, Ordinal, Format( "Best", 8 ), Formula( Row() ) ),
New Column( "Day", Numeric, Ordinal, Format( "Best", 8 ), formula( Random Integer( 110 ) ) ),
New Column( "temp1", Numeric, Continues, Format( "Best", 8 ), formula( Random Lognormal( :Day / 10, 5 ) ) ),
New Column( "temp2", Numeric, Continues, Format( "Best", 8 ), formula( Random Lognormal( :Day / 10, 5 ) ) ),
New Column( "Out",
Numeric,
Ordinal,
Format( "Best", 8 ),
Set Property( "Value Colors", {0 = -13977687, 1 = -4222943} ),
Color Cell by Value,
formula( 0 )
),
New Column( "Outtemp1",
Numeric,
Ordinal,
Format( "Best", 8 ),
Set Property( "Value Colors", {0 = -13977687, 1 = -4222943} ),
Color Cell by Value,
formula( 0 )
),
New Column( "Outtemp2",
Numeric,
Ordinal,
Format( "Best", 8 ),
Set Property( "Value Colors", {0 = -13977687, 1 = -4222943} ),
Color Cell by Value,
formula( 0 )
),
);
dt << run formulas;
Column( dt, "it" ) << delete formula;
Column( dt, "Day" ) << delete formula;
Column( dt, "temp1" ) << delete formula;
Column( dt, "temp2" ) << delete formula;
Column( dt, "Out" ) << delete formula;
Column( dt, "Outtemp1" ) << delete formula;
Column( dt, "Outtemp2" ) << delete formula;
// now we get to work
// make a list of days
byvarlist = Associative Array( dt:Day ) << get keys;
// make a list of columns
cols = dt << get column names( Continuous ); //List all Numeric columns
// loop through the days
For( i = 1, i <= N Items( byvarlist ), i++,
// select each Day
dt << select where( dt:Day == byvarlist[i] );
// subset each Day
subdt = dt << Subset( Selected Rows( 1 ) );
// clear selection for smooth workflow
dt << clear select;
// fined outliers in each variable within each Day
For( ii = 1, ii <= N Items( cols ), ii++,
out = Eval(
Parse(
"subdt << get rows where(
subdt:" || Char( cols[ii] ) || " > Col Quantile( subdt:" || Char( cols[ii] ) ||
", 0.75 ) + 1.5 * (Col Quantile( subdt:" || Char( cols[ii] ) || ", 0.75 ) - Col Quantile( subdt:" || Char( cols[ii] ) ||
", 0.25 )) | subdt:" || Char( cols[ii] ) || " <
Col Quantile( subdt:" || Char( cols[ii] ) ||
", 0.25 ) - 1.5 * (Col Quantile( subdt:" || Char( cols[ii] ) || ", 0.75 ) - Col Quantile( subdt:" || Char( cols[ii] ) ||
", 0.25 )));"
)
)`;
Eval( Parse( "column (subdt, \!"Out" || Char( cols[ii] || "\!" )[" || Char( out ) || "] = 1;" ) ) );
// also indicate the global outlier
Column( subdt, "Out" )[out] = 1;
//wait (0.00001);
);
// update original data table with new information for the Day
subdt << delete columns( "Day" );
subdt << delete columns( cols );
dt << Update( With( subdt ), Match Columns( :it = :it ) );
Close( subdt, No Save );
//Wait( 0.00001 );
);
dt << color by column( :Out );
我想提出一種不同的方法。
也許嘗試編寫腳本“探索異常值”平台,如下所示:
dt=current data table();<BR />obj=dt<<EXPLORE outliers=""></EXPLORE>
要進行設置,請使用“探索異常值”平台確定條件,然後將腳本保存到腳本窗口。
用你的條件代替我的條件,你就很好了。
您也可以只選擇離群值,然後反轉選擇範圍,然後製作要保留的數據子集。