0

I am trying to find the best Alpha for a Ridge model without CV, using Yellowbrick ManualAlphaSelection API. My code is pretty basic and it has been taken from the yellowbrick´s documentation. Even though it does not work:

from yellowbrick.regressor import ManualAlphaSelection
from sklearn.linear_model import Ridge
model = ManualAlphaSelection(Ridge(),  scoring='neg_mean_squared_error')
model.fit(X_train, y_train)
model.show()

Python raises the message: 'Ridge' is not a CV regularization model; try ManualAlphaSelection instead. But this message is wrong because the ManualAlphaSelection is already being used.

1 Answers1

2

This actually appears to be a bug in our library
Would you mind opening up a bug report on GitHub so we can be sure to fix it? Thank you for checking out Yellowbrick!

rebeccabilbro
  • 477
  • 4
  • 3
  • Update: we just merged the fix! https://github.com/DistrictDataLabs/yellowbrick/pull/1067 – rebeccabilbro Jun 10 '20 at 18:00
  • I am still getting that same error four months later. – CRich Oct 19 '20 at 22:33
  • 1
    Hi @CRich we just did a release on October 9; try updating your yellowbrick installation with `pip install -U yellowbrick` and check out the updated documentation here: https://www.scikit-yb.org/en/latest/api/regressor/alphas.html. Thanks for using Yellowbrick! – rebeccabilbro Oct 29 '20 at 14:27