| 1 | linear_model.RidgeClassifierCV's Parameter store_cv_values issue |
| 2 | #### Description |
| 3 | Parameter store_cv_values error on sklearn.linear_model.RidgeClassifierCV |
| 4 | |
| 5 | #### Steps/Code to Reproduce |
| 6 | import numpy as np |
| 7 | from sklearn import linear_model as lm |
| 8 | |
| 9 | #test database |
| 10 | n = 100 |
| 11 | x = np.random.randn(n, 30) |
| 12 | y = np.random.normal(size = n) |
| 13 | |
| 14 | rr = lm.RidgeClassifierCV(alphas = np.arange(0.1, 1000, 0.1), normalize = True, |
| 15 | store_cv_values = True).fit(x, y) |
| 16 | |
| 17 | #### Expected Results |
| 18 | Expected to get the usual ridge regression model output, keeping the cross validation predictions as attribute. |
| 19 | |
| 20 | #### Actual Results |
| 21 | TypeError: __init__() got an unexpected keyword argument 'store_cv_values' |
| 22 | |
| 23 | lm.RidgeClassifierCV actually has no parameter store_cv_values, even though some attributes depends on it. |
| 24 | |
| 25 | #### Versions |
| 26 | Windows-10-10.0.14393-SP0 |
| 27 | Python 3.6.3 |Anaconda, Inc.| (default, Oct 15 2017, 03:27:45) [MSC v.1900 64 bit (AMD64)] |
| 28 | NumPy 1.13.3 |
| 29 | SciPy 0.19.1 |
| 30 | Scikit-Learn 0.19.1 |
| 31 | |
| 32 | |
| 33 | Add store_cv_values boolean flag support to RidgeClassifierCV |
| 34 | Add store_cv_values support to RidgeClassifierCV - documentation claims that usage of this flag is possible: |
| 35 | |
| 36 | > cv_values_ : array, shape = [n_samples, n_alphas] or shape = [n_samples, n_responses, n_alphas], optional |
| 37 | > Cross-validation values for each alpha (if **store_cv_values**=True and `cv=None`). |
| 38 | |
| 39 | While actually usage of this flag gives |
| 40 | |
| 41 | > TypeError: **init**() got an unexpected keyword argument 'store_cv_values' |
| 42 | |