chen0040 / cpp-linear-genetic-programming

Package provides C++ implementation of linear genetic programming algorithm
MIT License
1 stars 2 forks source link

LGPOperator_Multiplication error? #1

Closed DonWM closed 7 years ago

DonWM commented 7 years ago

Shouldn't the be x1*x2 vs. x1+x2?

Also, how do you use this program for my dataset - a regression problem with 8 features and the desired result?

Thanks, Don

chen0040 commented 7 years ago

Thanks for the notification on the error. Yes you are right, the the implementation should be x1 * x2. I will fix this asap and update you again.

You might want to duplicate the mexican_hat example in my code for your regression problem. I wrote this code a few years ago, as a result the api is not as user-friendly as the Java version (https://github.com/chen0040/java-genetic-programming). I am currently working on an updated C++ version to make the API mirror that of the java version (possibly will be ready in these two days). At the meantime, you can start with the C++ mexican_hat example or directly use the Java version instead.

DonWM commented 7 years ago

It has been a while since I’ve used C++, so a little hard for me to follow. I now mostly use C#. That could be your next implementation since C# is close to Java. :) I’m not too Java literate but I’ll take a look.

Did you ever see Discipulus – an AIMGP implementation that is now exclusively used by www.TradingSystemLab.com http://www.TradingSystemLab.com ?

Thanks for your efforts in this area!

Don Maurer

From: Xianshun Chen [mailto:notifications@github.com] Sent: Tuesday, November 14, 2017 8:35 PM To: chen0040/cpp-linear-genetic-programming cpp-linear-genetic-programming@noreply.github.com Cc: DonWM DonWM@comcast.net; Author author@noreply.github.com Subject: Re: [chen0040/cpp-linear-genetic-programming] LGPOperator_Multiplication error? (#1)

Thanks for the notification on the error. Yes you are right, the the implementation should be x1 * x2. I will fix this asap and update you again.

You might want to duplicate the mexican_hat example in my code for your regression problem. I wrote this code a few years ago, as a result the api is not as user-friendly as the Java version (https://github.com/chen0040/java-genetic-programming). I am currently working on an updated C++ version to make the API mirror that of the java version (possibly will be ready in these two days). At the meantime, you can start with the C++ mexican_hat example or directly use the Java version instead.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/chen0040/cpp-linear-genetic-programming/issues/1#issuecomment-344483267 , or mute the thread https://github.com/notifications/unsubscribe-auth/AeEBcSInIr5-1aoUTqYSXBXMRXOcfb48ks5s2mnjgaJpZM4QeYDX .

chen0040 commented 7 years ago

Thanks for the suggestions, a C# version should not be a problem, I previously also wrote the linear genetic programming in C#. Will try to open source that version if you prefer the C# version

chen0040 commented 7 years ago

Hi Don, I have fixed the C++ multiply operator issue. Also i have open sourced my C# version of the linear genetic programming, you can take a look here https://github.com/chen0040/cs-linear-genetic-programming

Cheers, Xianshun

DonWM commented 7 years ago

Hi Xianshun,

Thanks so much for the C# version. You have quite a mastery of several programming languages which is impressive!

I expect the C# version isn’t as fast as the C++ version, but it is in a language I’m more familiar with.

If you get ambitious, you might consider direct instruction code for the genetic program like Discipulus did. Rather than interpret the linear code, they directly run code and directly modify it with crossover, mutation, etc. They claim a 20+X improvement in speed.

https://pdfs.semanticscholar.org/d2cd/ee5dac9a6eb903a713ff3329574d2b5b3c9c.pdf - a link to an old copy of the Discipulus Owner’s manual which might be useful.

http://www.tradingsystemlab.com/files/Frank%20D.%20Francone%20Licensiate%20Thesis.pdf – Francone paper on AIMGP – Automatic Induction of Machine Code, Genetic Programming

http://www.tradingsystemlab.com/files/CISC%20Architectures.pdf – Francone – CISC architectures paper though not much detail.

Another approach could be to use the GPU – perhaps with TensorFlow as was done in karoo_gp – a Python implementation of a tree approach – not a linear approach. It speeds up the fitness calculations for large problems.

https://github.com/kstaats/karoo_gp

https://www.tensorflow.org/

Thanks again for your efforts,

Don

From: Xianshun Chen [mailto:notifications@github.com] Sent: Thursday, November 16, 2017 8:58 PM To: chen0040/cpp-linear-genetic-programming cpp-linear-genetic-programming@noreply.github.com Cc: DonWM DonWM@comcast.net; Author author@noreply.github.com Subject: Re: [chen0040/cpp-linear-genetic-programming] LGPOperator_Multiplication error? (#1)

Hi Don, I have fixed the C++ multiply operator issue. Also i have open sourced my C# version of the linear genetic programming, you can take a look here https://github.com/chen0040/cs-linear-genetic-programming

Cheers, Xianshun

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/chen0040/cpp-linear-genetic-programming/issues/1#issuecomment-345145670 , or mute the thread https://github.com/notifications/unsubscribe-auth/AeEBcRqDAhYCIZPryu9N1TAttOthy7Fkks5s3RJQgaJpZM4QeYDX .

chen0040 commented 7 years ago

Many thanks for the suggestions and links. the direct instruction and gpu based approach look very interesting and will be very practical for linear gp. I will look into it