@@ -29,21 +29,14 @@ class QuantileLinearRegression(LinearRegression):
29
29
value.
30
30
"""
31
31
32
- def __init__ (self , fit_intercept = True , normalize = False , copy_X = True ,
32
+ def __init__ (self , fit_intercept = True , copy_X = True ,
33
33
n_jobs = 1 , delta = 0.0001 , max_iter = 10 , quantile = 0.5 ,
34
34
positive = False , verbose = False ):
35
35
"""
36
36
:param fit_intercept: boolean, optional, default True
37
37
whether to calculate the intercept for this model. If set
38
38
to False, no intercept will be used in calculations
39
39
(e.g. data is expected to be already centered).
40
- :param normalize: boolean, optional, default False
41
- This parameter is ignored when ``fit_intercept`` is set to False.
42
- If True, the regressors X will be normalized before regression by
43
- subtracting the mean and dividing by the l2-norm.
44
- If you wish to standardize, please use
45
- :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` on
46
- an estimator with ``normalize=False``.
47
40
:param copy_X: boolean, optional, default True
48
41
If True, X will be copied; else, it may be overwritten.
49
42
:param n_jobs: int, optional, default 1
@@ -65,12 +58,12 @@ def __init__(self, fit_intercept=True, normalize=False, copy_X=True,
65
58
"""
66
59
try :
67
60
LinearRegression .__init__ (
68
- self , fit_intercept = fit_intercept , normalize = normalize ,
61
+ self , fit_intercept = fit_intercept ,
69
62
copy_X = copy_X , n_jobs = n_jobs , positive = positive )
70
63
except TypeError :
71
64
# scikit-learn<0.24
72
65
LinearRegression .__init__ (
73
- self , fit_intercept = fit_intercept , normalize = normalize ,
66
+ self , fit_intercept = fit_intercept ,
74
67
copy_X = copy_X , n_jobs = n_jobs )
75
68
self .max_iter = max_iter
76
69
self .verbose = verbose
@@ -140,12 +133,12 @@ def compute_z(Xm, beta, Y, W, delta=0.0001):
140
133
141
134
try :
142
135
clr = LinearRegression (fit_intercept = False , copy_X = self .copy_X ,
143
- n_jobs = self .n_jobs , normalize = self . normalize ,
136
+ n_jobs = self .n_jobs ,
144
137
positive = self .positive )
145
138
except AttributeError :
146
139
# scikit-learn<0.24
147
140
clr = LinearRegression (fit_intercept = False , copy_X = self .copy_X ,
148
- n_jobs = self .n_jobs , normalize = self . normalize )
141
+ n_jobs = self .n_jobs )
149
142
150
143
W = numpy .ones (X .shape [0 ]) if sample_weight is None else sample_weight
151
144
self .n_iter_ = 0
0 commit comments