did i need target matrix for new input testing??

1 回表示 (過去 30 日間)
primrose khaleed
primrose khaleed 2014 年 6 月 13 日
コメント済み: primrose khaleed 2014 年 6 月 18 日
hi...i create neural network....the input matrix is with 18X20...(18= number of features and 20 = number of images for 2 classes)the target matrix is 2X20...after traning i want test the network with new image...the new enter images is matrix of 18X1.. i used this method for testing it:
simpleclassOutputs = sim(mynet11,input); figure();plotroc(T,simpleclassOutputs);
T= is target matrix which used in traning>> the error is ... Index exceeds matrix dimensions.
note: i used R2013a matlab and i am new in neural network
Error in plotconfusion>update_plot (line 396) y = y(:,known);
Error in plotconfusion (line 108) plotData = update_plot(param,fig,plotData,update_args{:});
Error in train (line 223) figure,plotconfusion(T,out);
my question is: how to sove this problem?? did i need target matrix for new input testing?? plz help me/

採用された回答

Greg Heath
Greg Heath 2014 年 6 月 13 日
If you have a new input you can use the net to obtain an output and the corresponding classification. However, without the corresponding target, you cannot determine, directly, if the classification is correct. Of course you could use the original data and design multiple classifiers of different types to estimate the probability of the classification being correct.
I think the roc plot needs output and target to be of the same size.
Hope this helps.
Thank you for formally accepting my answer
Greg
  1 件のコメント
Image Analyst
Image Analyst 2014 年 6 月 15 日
primrose's 3 "Answers" moved here since they were not actually answers to the original posted question but actually replies to Greg.
thanks greg for your replay...i dont understand your answer can you explane your answer,,can i solve my problem or not>> ??? plz help me
plz can you help me??? after trainig network how can display the images matching which has high simlirty with testing images????????
hi greg ...this is my file ..can you help me plz
By the way, no file was attached in the "Answer".

サインインしてコメントする。

その他の回答 (3 件)

primrose khaleed
primrose khaleed 2014 年 6 月 15 日
this is file
  2 件のコメント
Greg Heath
Greg Heath 2014 年 6 月 16 日
class = vec2ind(output) will give a 1 or 2 for each column of output.
If you know the correct class you can count the errors for each class and obtain the class per cent error rates.
Since each class is defined by multiple examples, how do you want to display the correct answer as a single image? The mean of the class members or the member that is the most similar?
Your choice.
primrose khaleed
primrose khaleed 2014 年 6 月 16 日
編集済み: primrose khaleed 2014 年 6 月 16 日
thank you very much...when i enter image from first class the output=1 and when enter image of second class the output=2...noow i want to used :
figure,plotconfusion(T,simpleclassOutputs);
but the there is error: Index exceeds matrix dimensions.
Error in plotconfusion>update_plot (line 396) y = y(:,known);
Error in plotconfusion (line 108) plotData = update_plot(param,fig,plotData,update_args{:});
Error in train (line 233) figure,plotconfusion(T,simpleclassOutputs);
can you solve this problem greg...i need your help...plz

サインインしてコメントする。


primrose khaleed
primrose khaleed 2014 年 6 月 15 日
hi greg ...can you see my file and check why is error...plz help me
  3 件のコメント
primrose khaleed
primrose khaleed 2014 年 6 月 16 日
thank you greg very much ....the i doing some processing in image this file contain the image processing :
Image Analyst
Image Analyst 2014 年 6 月 17 日
Did you read his comment, and his flag?

サインインしてコメントする。


primrose khaleed
primrose khaleed 2014 年 6 月 17 日
sorry image analysist....this way is correct?? thank you very much...when i enter image from first class the output=1 and when enter image of second class the output=2...noow i want to used :
figure,plotconfusion(T,simpleclassOutputs);
but the there is error: Index exceeds matrix dimensions.
Error in plotconfusion>update_plot (line 396) y = y(:,known);
Error in plotconfusion (line 108) plotData = update_plot(param,fig,plotData,update_args{:});
Error in train (line 233) figure,plotconfusion(T,simpleclassOutputs);
can you solve this problem greg...i need your help...plz
  2 件のコメント
Greg Heath
Greg Heath 2014 年 6 月 18 日
No, it is not correct. You used the ANSWER block instead of the COMMENT BLOCK.
plotconfusion is for matrices (not vectors) of the same size. Use confusion otherwise.
primrose khaleed
primrose khaleed 2014 年 6 月 18 日
the problem of plotconfusion is solved when doing
plotconfusion(simpleclassOutputs2,T); instead of used plotconfusion(T,simpleclassOutputs2);
...but the problem when enter the image as test_image of first classs ...the first run of program classify as first class and the second run classify as second class ...how can solve this problem ..????plz help me

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by