Use Classification Neural Network Model for another Dataset

1 回表示 (過去 30 日間)
mustafa alnasser
mustafa alnasser 2015 年 9 月 19 日
コメント済み: Greg Heath 2015 年 9 月 20 日
Dear All; I have built an AI model to classify the data using a dataset. Then i try to test this model to classify an external data set but it does not work properly because the code is not properly made , the code is below , could you help me in that :
clc; clear; close all; %Read The data [x1,TXT,RAW]=xlsread('ALL2.xlsx','lnRe'); [t1,TXT2,RAW2]=xlsread('ALL2.xlsx','OUT2');
x=x1';
t=t1';
% Build the model
net= patternnet ([100]);
% net.divideParam.trainRatio = 70/100;
% net.divideParam.valRatio = 15/100;
% net.divideParam.testRatio = 15/100;
% view(net)
net=init(net);
[net,tr] = train(net,x,t);
% Test the Network [x2,TXT3,RAW3]=xlsread('expsettest.xlsx','Ln(Re)'); [t2,TXT4,RAW4]=xlsread('expsettest.xlsx','out-test'); xt=x2'; tt=t2'; outputs = net( xt); errors = gsubtract(tt,outputs); performance = perform(net,tt,outputs)
figure, plotconfusion(tt,outputs)

採用された回答

Greg Heath
Greg Heath 2015 年 9 月 20 日
100 hidden nodes appears to be a ridiculous number.
Why don't you start by just using all defaults.
help patternnet
doc patternnet
Then Search NEWSGROUP and ANSWERS using
greg patternnet
Hope this helps.
Thank you for formally accepting my answer
Greg
  2 件のコメント
mustafa alnasser
mustafa alnasser 2015 年 9 月 20 日
Dear Greg
Thank you for your help
Let me explain for you my issue:
My problem is in the second part of the code, which is test part . in the confusion matrix , i got unreasonable results in terms of data points for each group , it gave more data that it should be for each group , i feel that i am not programing the test code in right way
Best Regards
Greg Heath
Greg Heath 2015 年 9 月 20 日
Please explain your variables and their dimensions

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSequence and Numeric Feature Data Workflows についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by