異なる変数に基づく混同行列の色と数やあ、
グラフビルダーを使用して混同行列に取り組んでいます。 私は 2 つの列を持っています。1 つは既知のクラス (y 軸) で、もう 1 つは予測されたクラス (x 軸) です。 ボックス内の数字が各ボックスのサンプル数を示すようにします。 下の図に示すように。

ただし、カラー グラデーション マップの代わりに、メインの対角線 (True Positives) を 1 つの色にし、残りのボックスを別の色にしたいと考えています。 サンプルが真陽性であるかどうかに応じて、1 または 0 の列がありますが、この列をグラフ ビルダーの色オプションに追加すると、次のようになります。

2番目の写真のように色を付ける方法はありますが、最初の写真のラベルはありますか?
ありがとうございました!
グラフィックRe: 異なる変数に基づく混同行列の色と数最初に表を要約してから、カウントの代わりに行ラベルを使用してグラフを描くことができます。

Names Default To Here( 1 );
dt = Open( "$Sample_data/big class.jmp" );
<BR />random reset(2);
dt << New Column("Age 2", Numeric, "Ordinal", Format("Fixed Dec", 5, 0), Formula(:age[Col Shuffle()]));
dt:age << Set Name("Age 1");
dtSum = (dt << Tabulate(
Add Table(
Column Table( Statistics( N ) ),
Row Table( Grouping Columns( :"Age 2"n, :"Age 1"n ) )
)
)) << Make Into Data Table;
dtSum << New Column("Is Diagonal", Numeric, "Nominal", Format("Best", 12), Formula(:Age 1 == :Age 2));
dtSum << Graph Builder(
Size( 525, 450 ),
Show Control Panel( 0 ),
Variables( X( :Age 1 ), Y( :Age 2 ), Color( :Is Diagonal ) ),
Elements( Heatmap( X, Y, Legend( 5 ), Label( "Label by Row" ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
5,
Properties( 0, {Fill Color( -15790017 )}, Item ID( "0", 1 ) ),
Properties( 1, {Fill Color( 5 )}, Item ID( "1", 1 ) )
)}
)
)
);
Re: 異なる変数に基づく混同行列の色と数ご回答いただきありがとうございますが、これで正しい解決策が得られるとは思いません。以下を参照してください。

左は表示される実際の値を示し、右は提供されたスクリプトの結果を示しています。
Re: 異なる変数に基づく混同行列の色と数申し訳ありませんが、そのステップを保存できませんでした。ここでも私は最初にテーブルを要約してから、カウントの代わりに行ラベルを使用してグラフを描画しましたが、今回は実際に行ラベルを定義しました:

Names Default To Here( 1 );
dt = Open( "$Sample_data/big class.jmp" );
random reset(2);
dt << New Column("Age 2", Numeric, "Ordinal", Format("Fixed Dec", 5, 0), Formula(:age[Col Shuffle()]));
dt << Run Formulas;
dt:age << Set Name("Age 1");
dtSum = (sum = dt << Tabulate(
Add Table(
Column Table( Statistics( N ) ),
Row Table( Grouping Columns( :"Age 2"n, :"Age 1"n ) )
)
)) << Make Into Data Table;
dtSum << New Column("Is Diagonal", Numeric, "Nominal", Format("Best", 12), Formula(:Age 1 == :Age 2));
dtSum:N << Label( 1 );
gb = dtSum << Graph Builder(
Size( 525, 450 ),
Show Control Panel( 0 ),
Variables( X( :Age 1 ), Y( :Age 2 ), Color( :Is Diagonal ) ),
Elements( Heatmap( X, Y, Legend( 5 ), Label( "Label by Row" ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
5,
Properties( 0, {Fill Color( -15790017 )}, Item ID( "0", 1 ) ),
Properties( 1, {Fill Color( 5 )}, Item ID( "1", 1 ) )
)}
)
)
);