120万行×16列
周囲温度の列には、グラフビルダーのボックスとウィスカーのトップテールの上に、異常値として分類された多くの観測値が(日ごとに)表示されます。 これは残念ですが、周囲の温度測定プローブが移動車両に配置されているためと思われます。
目標は、ウィジェットAとウィジェットBのパフォーマンスを比較するためにニューラルネットワークを使用してデータをモデル化する前に、周囲温度の異常値を持つデータの行を適切に識別し、抑制することです。
ここでいくつかのスレッドを読みましたが、ソリューションで同様の質問を見つけることができません。
やさしい
外れ値ボックスを表示する
すべての外れ値ポイントの上にカーソルをドラッグすると、データテーブル内のすべての外れ値ポイントが選択されます。
次に、データテーブルのRowState列に移動し、選択された行の1つに移動します。
選択した行にカーソルを合わせながら、マウスを右クリックして[除外]を選択します
選択したすべての行が除外されます
[非表示と除外]を選択できます
こんにちはしゅう
私はかつて、変数のいずれかのグループの外れ値である行を指定するスクリプトを作成しました。私はそれを更新して、一度の列と温度のいくつかの列に異なる日を含めるようにしました。元の各列の外れ値を示す新しいバイナリ列と、観測値がいずれかの変数の外れ値かどうかを示すもう1つの列を生成します。
動作するかどうかをお知らせします。
ロン
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 );
少し異なるアプローチを提案したいと思います。
次のように、Explorer Outliersプラットフォームのスクリプトを作成してみてください。
dt=current data table();<BR />obj=dt<<EXPLORE outliers=""></EXPLORE>
これを設定するには、Explorer Outliersプラットフォームを使用して条件を特定し、スクリプトをスクリプトウィンドウに保存します。
自分の条件を自分のものに置き換えれば、準備完了です。
また、外れ値を選択し、選択を反転して、保持するデータのサブセットを作成することもできます。