Why Genetic Programming result is not consistent?
显示 更早的评论
Hello
Dear experts
I am working on finding a relationship on some input parameters (X1, ... , X5) and an output parameter (Y). I am using Genetic Programming Toolbox in MATLAB and the provided example and just changed the input/output data to build my own equation. The problem is that every time I run the program it finds different parameters as "the best" model with different values for fitness and mse!
I don't know if that's how GP works, but is there any way that I make the code be in a way that considers all possible functions ('+','*',...) and find the best model?
I will attach my program here.
Thank you in advance for your help :)
4 个评论
You linked to a FEX page, which contains third-party code. Of course neither TMW (the makers of MATLAB) nor any volunteer on this forum can explain how some random person's code should work, without spending a lot of time reverse engineering it: if you want to know how their code works, you should ask its author.
"is there any way that I make the code be in a way that considers all possible functions ('+','*',...) and find the best model?"
It sounds like you might want Global Search:
Stephen23
2020-1-16
Benjamin's "Answer" moved here:
Dear Stephen, thank you for your response.
Well, I added Genetic Programming Toolbox from MATLAB add-ons, that's why I didn't assume just a random person exchanged that.
Regarding the GA optimizer, I just didn't know if that is something appropriate to my problem.
My goal is to develop an simple equation using some input parameters (X's) to predict Y, having any possible functions such as '+','-','/','exp','ln', and I came acroos with GP and I found that helpful!
Thank you for letting me know about Global Search and GA optimizer tools. I will try to see how I can use them.
@Benjamin: sorry, my mistake for confusing Genetic Programming with Genetic Algorithm ... a momentary synaptic lapse (hangs head in shame).
While FEX is a great resource of third-party code, you have to be very selective about choosing which submissions are worthwhile using or not: that might be a well-written toolbox... or it might not be. In any case, contact its author if there is something that you want to know that is not answered by reading its documentation.
Benjamin
2020-1-16
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Genetic Algorithm 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!