How do use the newgrnn function for 5 featured data?

when i was using this newgrnn function matlab was showing an error.. inputs is a matrix of dimensions 2000x5 and output is a matrix of dimensions 2000x1.. this was the error which i got.. anyone please help.. thanks
>> net=newgrnn(inputs_train,AQI_train)
Error using network/subsasgn>network_subsasgn (line 528)
net.IW{1,1} must be a 1-by-2000 matrix.
Error in network/subsasgn (line 13) net = network_subsasgn(net,subscripts,v,netname);
Error in newgrnn>create_network (line 123) net.iw{1,1} = p';
Error in newgrnn (line 67) net = create_network(param); end

回答 (1 件)

Greg Heath
Greg Heath 2017 年 3 月 20 日

0 投票

In most NN Toolbox functions: For N pairs of I-dimensional "I"nputs and corresponding O-dimensional "O"utput targets
[ I N ] = size(input)
and
[ O N ] = size(target)
Hope this helps
Thank you for formally accepting my answer
Greg

3 件のコメント

Soumith Reddy
Soumith Reddy 2017 年 3 月 21 日
thank you greg, could you please tell how should my parameters passed to the newgrnn function when the inputs are as mentioned in the question?
Greg Heath
Greg Heath 2017 年 3 月 22 日
Exactly as shown in the documentation
help newgrnn
and
doc newgrnn
Hope this helps.
Greg
Soumith Reddy
Soumith Reddy 2017 年 3 月 22 日
Thanks for the reply Greg. In the documentation it is said that net=newgrnn(x,y,spread) where x(input) is a AxN matrix and y(target) is a BxN matrix. when the network is trained we can simulate the network using a= sim(net,input); when i do this the prediction by matlab is not matching with the training data itself. Please help me.

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

カテゴリ

ヘルプ センター および File ExchangeSequence and Numeric Feature Data Workflows についてさらに検索

質問済み:

2017 年 3 月 20 日

コメント済み:

2017 年 3 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by