'EBLinearRegression' object has no attribute '_center_data'
sergeyf opened this issue · 5 comments
Hello,
I'm trying to use skbayes
with the latest scikit-learn (0.18.x). It looks like self._center_data
is no longer being used in sklearn:
from skbayes.linear_models import EBLinearRegression
EB = EBLinearRegression()
EB.fit(X,y)
Traceback (most recent call last):
File "<ipython-input-30-cd5ea38985d5>", line 1, in <module>
EB.fit(X,y)
File "C:\Anaconda2\lib\site-packages\skbayes\linear_models\bayesian_regression.py", line 102, in fit
X, y, X_mean, y_mean, X_std = self._center_data(X, y, self.fit_intercept,
AttributeError: 'EBLinearRegression' object has no attribute '_center_data'
Hmm,
You are right. I will look into this if you have any suggestions you are welcome to contribute.
Thanks.
I renamed self._center_data
to self._preprocess_data
in a bunch of place and it seems to have worked, but I can't test because tester.py
seems to be out of date.
I just think a lot of people still use old versions of scikit-learn, where there is no _preprocess_data
method ( I was one of those people ). I think it will be easier to write simple _center_data method.
As for testing, I am working on my test suite , but you can use check_estimator method from scikit-learn for testing any Linear Regression Model in skbayes.
Hi, Sergey=)
I added _center_method to linear models issue should be resolved.
Thank you very much, that fixed it!