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

Bug in RVC #18

Open
jonathf opened this issue Jun 15, 2016 · 0 comments
Open

Bug in RVC #18

jonathf opened this issue Jun 15, 2016 · 0 comments
Assignees
Labels

Comments

@jonathf
Copy link

jonathf commented Jun 15, 2016

So I've been experimenting with you code for a project I am working with. Great work on the implementation. It is much appreciated that you have taken the time to make this.

I might be using it wrong, but I think I found a bug in your code. Take a look at the following simple example:

>>> import skbayes.rvm_ard_models
>>> import numpy as np
>>> import matplotlib.pyplot as plt
>>> 
>>> rvm = skbayes.rvm_ard_models.RVC()
>>> rvm.fit([[-1], [1]], [0, 1])
RVC(coef0=1, degree=2, fit_intercept=True, gamma=None, kernel='rbf',
  kernel_params=None, n_iter=300, n_iter_solver=30, solver='lbfgs_b',
  tol=0.0001, tol_solver=1e-05, verbose=False)
>>>
>>> x = np.linspace(-5, 5, 200).reshape(200, 1)
>>> y = rvm.predict_proba(x)[:,0]
>>> plt.plot(y)
>>> plt.savefig("out.pdf")

The figure produced:
out.pdf

It looks like the aposteriori estimate only includes the [1] and not the [-1].

@AmazaspShumik AmazaspShumik self-assigned this Jun 15, 2016
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