Main Content

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

plotpc

パーセプトロン ベクトル プロットでの分類ラインのプロット

構文

plotpc(W,B)
plotpc(W,B,H)

説明

plotpc(W,B) は、次の入力を取ります。

W

SR 列の重み行列 (R は 3 以下でなければならない)

B

S1 列のバイアス ベクトル

これは、プロットされた分類ラインのハンドルを返します。

plotpc(W,B,H) は、さらに次の入力を取ります。

H

最後にプロットされたラインのハンドル

これは、新しいラインをプロットする前に、最後のラインを削除します。

この関数は現在の軸を変更しません。また、plotpv の後に呼び出されることを想定しています。

分類ラインのプロット

次のコードは、パーセプトロンの入力とターゲットを定義してプロットします。

p = [0 0 1 1; 0 1 0 1];
t = [0 0 0 1];
plotpv(p,t)

Figure contains an axes object. The axes object with title Vectors to be Classified, xlabel P(1), ylabel P(2) contains 4 objects of type line. One or more of the lines displays its values using only markers

次のコードは、パーセプトロンを作成し、その重みとバイアスに値を割り当て、結果として得られた分類ラインをプロットします。

net = perceptron;
net = configure(net,p,t);
net.iw{1,1} = [-1.2 -0.5];
net.b{1} = 1;
plotpc(net.iw{1,1},net.b{1})

Figure contains an axes object. The axes object with title Vectors to be Classified, xlabel P(1), ylabel P(2) contains 5 objects of type line. One or more of the lines displays its values using only markers

バージョン履歴

R2006a より前に導入

参考