Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I apply the equation to make binary classification #226

Open
ghost opened this issue Apr 25, 2021 · 6 comments
Open

How can I apply the equation to make binary classification #226

ghost opened this issue Apr 25, 2021 · 6 comments
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Apr 25, 2021

I have a question about SymbolicClassifier. The resulting equation is like, x2/x1 + x3- x5. How can I apply the equation to make binary classification ? My goal is to make binary classification on my data.

@ghost ghost added the bug label Apr 25, 2021
@IFFranciscoME
Copy link

you might consider using the output of the equation as an input to an activation function, a sigmoid for example will therefore create a logistic regression classifier.

@ghost
Copy link
Author

ghost commented Apr 25, 2021

Thank you for your response. Since it is a classifier, can not we learn it again to find a threshold values for the output equation based image so that it makes binary classification ? It would be much applicable if the SymbolicClassifier learns to output the equation like it. class: 0 if x2/x1 < 8 and x3- x5 > 9. How can I write such a custom function ......

@trevorstephens
Copy link
Owner

https://gplearn.readthedocs.io/en/stable/intro.html#classification a sigmoid is used by default to transform the output

@ghost
Copy link
Author

ghost commented Apr 26, 2021

yes sigmoid has been used to classify the data. However, my requirement is to get equation from _Program after the sigmoid is applied. What is printing now is before the sigmoid is applied.

@trevorstephens
Copy link
Owner

Yes, it's possible to add the sigmoid to the representation printed on the screen. I can put this in the long-overdue next release.

@trevorstephens trevorstephens added this to the 0.5.0 milestone Aug 9, 2021
@trevorstephens
Copy link
Owner

I think it makes sense to do it, thanks for the report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants