twmeggs / anfis

Python implementation of an Adaptive neuro fuzzy inference system
MIT License
201 stars 108 forks source link

Current error increasing with the number of epochs (from epoch 20) #23

Open Rafaelvsantos99 opened 1 year ago

Rafaelvsantos99 commented 1 year ago

Hi, I would like to know if anyone has encountered this problem: When using the function for a more complex problem, I noticed that the current model error starts to increase. I thought it was an error in my program, but when I tested the repository example, when I increased the epochs a little more, I found the same problem.

I leave below the image referring to the results of the example of the repository for more than 20 epochs:

image

On the one hand, I don't know if I should let the model evolve a little in this sense, hoping that it is just trying not to overfit. However, I think that the assumption is always that the error decreases or at least stabilizes. I tried to "fix" this by putting a simple "if" inside the anfis.py function itself that when the error increases more than 0.001, for more than 3 times (for exemple), it stops the training loop. However, I don't know to what extent this cannot be detrimental to the results

Thanks in advance