How to use DEAP to generate the best expression with multiple variables

223 views
Skip to first unread message

q oy

unread,
Jul 11, 2022, 10:00:39 AM7/11/22
to deap-users
Hi
I have a set of data with 20 parameters, and I want to use this set of data to fit an optimal expression. I see an example of genetic programming, which has only one parameter X, while I have X1 to X20. I'm new to these, so I don't know much about them. I hope you can point me out. Thank you.

François-Michel De Rainville

unread,
Jul 11, 2022, 10:01:55 AM7/11/22
to deap-users
If you browse the examples on github, you should find genetic programming examples with more input variables.


Cheers

Le lun. 11 juill. 2022, 10 h 00, 'q oy' via deap-users <deap-...@googlegroups.com> a écrit :
Hi
I have a set of data with 20 parameters, and I want to use this set of data to fit an optimal expression. I see an example of genetic programming, which has only one parameter X, while I have X1 to X20. I'm new to these, so I don't know much about them. I hope you can point me out. Thank you.

--
You received this message because you are subscribed to the Google Groups "deap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deap-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/deap-users/c8c249e0-a13f-4015-a1a4-961fd73bf4f6n%40googlegroups.com.

andrew morgan

unread,
Jul 11, 2022, 11:54:56 AM7/11/22
to deap-...@googlegroups.com
Hello

If you are ok to construct a small csv data dictionary for your dataset in an editor or spreadsheet, with these column headings:

Field_No, Symbol, Type, Description

Then I have a python notebook which should automate just about everything for you, and which you can use as a template.

It’s produced for exactly for your use case - and provides a guided tour to generating a symbolic regression for your own dataset.
It uses a deap extension called Geppy to do the symbolic regression - (uses Gene Expression Programming) and accepts any number of columns in your data, as long as they are described in the dictionary.


I’m about to do a pull request to the main Geppy repo, so if you try this out and find errors, please do raise them as issues on my repo, and I’ll sort them out before I do that.

Thanks!
Andrew



On 11 Jul 2022, at 06:36, 'q oy' via deap-users <deap-...@googlegroups.com> wrote:

Hi
I have a set of data with 20 parameters, and I want to use this set of data to fit an optimal expression. I see an example of genetic programming, which has only one parameter X, while I have X1 to X20. I'm new to these, so I don't know much about them. I hope you can point me out. Thank you.

q oy

unread,
Jul 12, 2022, 12:29:34 AM7/12/22
to deap-users
Thank you very much for your help. I will read your python notebook carefully. I look forward to our continued communication in the future. Thank you again for your help.
Reply all
Reply to author
Forward
0 new messages