0
$\begingroup$

Can someone explain why the Fit line does not match the true label? I do not understand what exactly is happening and where I have a problem in my model.

enter image description here

Here is my code:


input=heat_y_noisy';              %input data 20000x100
input_normalized=input;

output=alphas_optimal;            %output 20000x1



Xtrain=input(1:18000,:);
Ytrain=output(1:18000,1);

Xtest=input(18000:20000,:);
Ytest=output(18001:20000,1);

net = feedforwardnet([30 20 5] , 'traingd');
net.trainParam.epochs=30;
net.layers{end}.transferFcn='logsig';
net = train(net, Xtrain', Ytrain')

%%
ypred=net(Xtest');

label_predicted=ypred(1,1:5)
true_label=Ytest(1:5,1)'

and why does the output remains the same for all inputs?

label_predicted =

    0.0360    0.0347    0.0349    0.0358    0.0373


true_label =

    0.0279    0.0265    0.0182    0.0176    0.0148

Thank you for your help!

$\endgroup$
3
  • $\begingroup$ What is logsig ? Why feedforward and not a backpropagation ? $\endgroup$
    – amol goel
    Aug 21, 2022 at 8:43
  • $\begingroup$ @amolgoel do you mean that my model does not train? $\endgroup$
    – snipherr
    Aug 22, 2022 at 12:06
  • $\begingroup$ may be . I don't see backproagation in network. $\endgroup$
    – amol goel
    Aug 23, 2022 at 13:23

1 Answer 1

0
$\begingroup$

Your model has high bias . This means high error on train data, underfitting. You need to increase complexity of model. You can achieve his by increasing The number of nodes in hidden layer, total number of layers .

$\endgroup$
1
  • $\begingroup$ ok clear thank you $\endgroup$
    – snipherr
    Aug 22, 2022 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.