how to convert my matrix to a {0,1} c-dimensional unit vectors?
1 回表示 (過去 30 日間)
古いコメントを表示
Hi All
I would like to know how can I convert my matrix that I have attached to a {0,1} c-dimensional unit vectors ? I don't exactly know how it should be and what's the command to do it
0 件のコメント
採用された回答
Greg Heath
2015 年 3 月 16 日
Copy and paste into the command line
trueclassindices = [ 1 3 5 7 9 2 4 6 8 10 ]
target = ind2vec(trueclassindices)
trueclassindices = vec2ind(target)
%==== NN design using target =====
output = net(input);
assignedclasses = vec2ind(output)
error = assignedclasses~=trueclassindices
Nerr = numel(error)
PctErr = 100*Nerr/N
Hope this helps
Thank you for formally accepting my answer
Greg
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Particle & Nuclear Physics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!