MATLAB Answers

0

I get a "Performance function replaced with squared error performance" warning when trying to set 'crossentropy' as the performance function.

Latest activity Edited by Greg Heath
on 18 Jun 2019
If I run the following code:
[x,t] = house_dataset;
net = fitnet(10);
net.performFcn = 'crossentropy';
[net,tr] = train(net,x,t);
I get this warning:
Warning: Performance function replaced with squared error performance.
> In trainlm>formatNet (line 155)
In trainlm (line 65)
In nntraining.setup (line 14)
In network/train (line 335)
How can I use 'crossentropy' as the performance function then?
Regards

  1 Comment

1. Where did you find house_dataset?
It does not come with MATLAB17a
2. For classification
help patternnet
doc patternnet
Hope this helps
Greg

Sign in to comment.

4 Answers

Answer by Alex
on 7 Apr 2016

It worked for me after adding
net.performParam.regularization = 0.1;
net.performParam.normalization = 'none';
Seems to be necessary when using cross entropy.

  0 Comments

Sign in to comment.


Answer by Greg Heath
on 19 Apr 2016

Crossentropy is, theoretically, not appropriate for regression.
Classically, it is only used for classification and pattern-recognition. It's definition involves probability distribution functions and their logarithms.
That is not to say that it will not yield good answers for regression problems. Obviously I have never tried it and, one day when I get bored, I might tinker around with it.
Hope this helps.
If you think this answer is worth accepting, THANKS!
Greg

  0 Comments

Sign in to comment.


Answer by Chinmay Maheshwari on 2 Aug 2017

Any updates on it as i am also facing the same trouble. I am not to customize my performance function because of this Thanks in advance

  0 Comments

Sign in to comment.


Answer by Greg Heath
on 5 Aug 2017
Edited by Greg Heath
on 18 Jun 2019

If you insist on using CROSSENTROPY, try PATTERNNET.
Hope this helps.
Thank you for formally accepting my answer
Greg

  0 Comments

Sign in to comment.