margin
分類マージン
説明
入力引数
出力引数
例
先頭 2 列のデータで学習された、フィッシャーのアヤメ データの分類マージンを計算し、最後の 10 エントリを表示します。
load fisheriris
X = meas(:,1:2);
tree = fitctree(X,species);
M = margin(tree,X,species);
M(end-10:end)
ans = 0.1111 0.1111 0.1111 -0.2857 0.6364 0.6364 0.1111 0.7500 1.0000 0.6364 0.2000
すべてのデータについて学習した分類木の方が優れています。
tree = fitctree(meas,species); M = margin(tree,meas,species); M(end-10:end)
ans = 0.9565 0.9565 0.9565 0.9565 0.9565 0.9565 0.9565 0.9565 0.9565 0.9565 0.9565