Elffuss BraidHub

kikocis/auto-code-rover public

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