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

Predict_proba missing in the ScikitLearn.jl interface? #108

Closed
tlienart opened this issue Jan 22, 2019 · 4 comments
Closed

Predict_proba missing in the ScikitLearn.jl interface? #108

tlienart opened this issue Jan 22, 2019 · 4 comments
Assignees

Comments

@tlienart
Copy link

Hello, I noticed that the ScikitLearn.jl interface only implements predict via predict_y of a GPE. However it seems to me that GaussianProcesses should naturally correspond to a predict_proba since they're a probabilistic method (?).

For a classifier, in the Classification notebook, you use a GPMC could this be used to correspond to the predict_proba of ScikitLearn?

Thanks!

@chris-nemeth
Copy link
Member

Sorry for the slow response. Thanks for raising the issue regarding scikitlearn.jl. When we first incorporated scikitlearn a few years ago we only included some basic functionality and over time we haven't really maintained our interface with scikitlearn. A failing on our part. I'm not familiar with predict_proba so I couldn't say for sure.

@tlienart
Copy link
Author

tlienart commented Feb 2, 2019

Thanks, the question arises from trying to develop a kind of MLR in Julia (https://github.com/alan-turing-institute/MLJ.jl) where we're currently writing a bunch of interfaces to existing julia packages out there.

In the case of Gaussian Processes for instance it seems the package can be used for classification if I'm not mistaken as per one of the notebook, and in that case one may want to predict a probability of being in a class for each class rather than just the most likely class.
Do you know whether I could do this with the package?

Thanks!

@chris-nemeth
Copy link
Member

MLJ.jl) looks like an interesting project. Please do let us know if you have any suggestions for how we can make GaussianProcesses.jl interface better with other packages.

With regards to your questions, yes, you can extract the probability. In this example, you have a Bernoulli likelihood where the probability of success is the probit transformed latent GP function (see https://github.com/STOR-i/GaussianProcesses.jl/blob/master/src/likelihoods/bernoulli.jl). As the mean of a Bernoulli dist. is the success probability, you could use the function mean_lik, or simply extract the GP function and apply your own probit/logit transformation. If you think that this could be a useful feature, we could modify the interface so that extracting the probability is more user-friendly.

At the moment, we've only implemented binary classification for GPs, however, we are working to extend this to multi-class classification.

@tlienart
Copy link
Author

tlienart commented Feb 4, 2019

Thanks that's great, I'll try using mean_lik.

If you think that this could be a useful feature, we could modify the interface so that extracting the probability is more user-friendly.

I would think that would be great yes, especially for people who may be less familiar with GPs. Either that or a short example in the current classification notebook.

At the moment, we've only implemented binary classification for GPs, however, we are working to extend this to multi-class classification.

Thanks for taking the time to answer, I think it closes the issue for now (feel free to re-open if you think it might serve as a good "todo" item).

@tlienart tlienart closed this as completed Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants