trevorstephens / gplearn

Genetic Programming in Python, with a scikit-learn inspired API
http://gplearn.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.62k stars 283 forks source link

Binary classification with gplearn #61

Closed mattrym closed 7 years ago

mattrym commented 7 years ago

Hey Trevor,

thank you for your work at the gplearn package - I really appreciate your work!

I'm quite interested in implementing genetic programming for multiclass classification, however, I'm quite out-of-time and probably won't manage to wait until the release of 0.3 version. I've just wondered, if I could use either One vs. One or One vs. All approach (like in SVM), using binary classification.

What would be the best way to implement binary classifier using estimators, which are available in gplearn so far? I've tried some of my ideas, however, I'm not very skilled in statistics and my attempts ended in failure.

I would be really thankful for giving me a hand.

Best regards, Mateusz

trevorstephens commented 7 years ago

It isn't supported yet. Pegged for the 0.4.0 release now. You might be able to get something workable with a custom fitness measure. http://gplearn.readthedocs.io/en/stable/advanced.html#

Common ways to do it is specify a negative result of symbolic regression as one class and a positive result as the other class.