@@ -727,6 +727,11 @@ def __init__(
727
727
robust : bool = True ,
728
728
expected_information : bool = False ,
729
729
):
730
+ warnings .warn (
731
+ "Arguments to :class:`GeneralizedLinearRegressorBase`, :class:`GeneralizedLinearRegressor` " ,
732
+ "and :class:`GeneralizedLinearRegressorCV` will become keyword-only in 3.0.0." ,
733
+ FutureWarning ,
734
+ )
730
735
self .l1_ratio = l1_ratio
731
736
self .P1 = P1
732
737
self .P2 = P2
@@ -1133,6 +1138,10 @@ def report_diagnostics(
1133
1138
custom_columns : iterable, optional (default=None)
1134
1139
Print only the specified columns.
1135
1140
"""
1141
+ warnings .warn (
1142
+ "Arguments to `report_diagnostics` will become keyword-only in 3.0.0." ,
1143
+ FutureWarning ,
1144
+ )
1136
1145
diagnostics = self .get_formatted_diagnostics (full_report , custom_columns )
1137
1146
if isinstance (diagnostics , str ):
1138
1147
print (diagnostics )
@@ -1159,6 +1168,10 @@ def get_formatted_diagnostics(
1159
1168
custom_columns : iterable, optional (default=None)
1160
1169
Print only the specified columns.
1161
1170
"""
1171
+ warnings .warn (
1172
+ "Arguments to `get_formatted_diagnostics` will become keyword-only in 3.0.0." ,
1173
+ FutureWarning ,
1174
+ )
1162
1175
if not hasattr (self , "diagnostics_" ):
1163
1176
to_print = "Model has not been fit, so no diagnostics exist."
1164
1177
return to_print
@@ -1236,6 +1249,10 @@ def linear_predictor(
1236
1249
array, shape (n_samples, n_alphas)
1237
1250
The linear predictor.
1238
1251
"""
1252
+ warnings .warn (
1253
+ "Arguments to `linear_predictor` other than `X` and `offset` will become keyword-only in 3.0.0." ,
1254
+ FutureWarning ,
1255
+ )
1239
1256
check_is_fitted (self , "coef_" )
1240
1257
1241
1258
if (alpha is not None ) and (alpha_index is not None ):
@@ -1315,6 +1332,10 @@ def predict(
1315
1332
array, shape (n_samples, n_alphas)
1316
1333
Predicted values times ``sample_weight``.
1317
1334
"""
1335
+ warnings .warn (
1336
+ "Arguments to `predict` other than `X`, ``sample_weight`, and `offset` will become keyword-only in 3.0.0." ,
1337
+ FutureWarning ,
1338
+ )
1318
1339
if isinstance (X , pd .DataFrame ) and hasattr (self , "feature_dtypes_" ):
1319
1340
X = _align_df_categories (X , self .feature_dtypes_ )
1320
1341
@@ -1390,6 +1411,11 @@ def coef_table(
1390
1411
pandas.DataFrame
1391
1412
A table of the regression results.
1392
1413
"""
1414
+ warnings .warn (
1415
+ "Arguments to `coef_table` other than `X`, `y`, `sample_weight`, and `offset` "
1416
+ "will become keyword-only in 3.0.0." ,
1417
+ FutureWarning ,
1418
+ )
1393
1419
if self .fit_intercept :
1394
1420
names = ["intercept" ] + list (self .feature_names_ )
1395
1421
beta = np .concatenate ([[self .intercept_ ], self .coef_ ])
@@ -1498,6 +1524,11 @@ def wald_test(
1498
1524
WaldTestResult
1499
1525
NamedTuple with test statistic, p-value, and degrees of freedom.
1500
1526
"""
1527
+ warnings .warn (
1528
+ "Arguments to `coef_table` other than `X`, `y`, `sample_weight`, and `offset` "
1529
+ "will become keyword-only in 3.0.0." ,
1530
+ FutureWarning ,
1531
+ )
1501
1532
1502
1533
num_lhs_specs = sum ([R is not None , features is not None ])
1503
1534
if num_lhs_specs != 1 :
@@ -1890,6 +1921,11 @@ def covariance_matrix(
1890
1921
Cambridge university press
1891
1922
1892
1923
"""
1924
+ warnings .warn (
1925
+ "Arguments to `covaria ce_matrix` other than `X`, `y`, `sample_weight`, and `offset` "
1926
+ "will become keyword-only in 3.0.0." ,
1927
+ FutureWarning ,
1928
+ )
1893
1929
self .covariance_matrix_ : Union [np .ndarray , None ]
1894
1930
1895
1931
if robust is None :
@@ -2763,6 +2799,9 @@ def __init__(
2763
2799
robust : bool = True ,
2764
2800
expected_information : bool = False ,
2765
2801
):
2802
+ warnings .warn (
2803
+ "The default value of `alpha` will become `0` in 3.0.0." , FutureWarning
2804
+ )
2766
2805
self .alphas = alphas
2767
2806
self .alpha = alpha
2768
2807
super ().__init__ (
@@ -2895,6 +2934,11 @@ def fit(
2895
2934
-------
2896
2935
self
2897
2936
"""
2937
+ warnings .warn (
2938
+ "Arguments to `fit` other than `X`, `y`, `sample_weight`, and `offset` "
2939
+ "will become keyword-only in 3.0.0." ,
2940
+ FutureWarning ,
2941
+ )
2898
2942
2899
2943
self ._validate_hyperparameters ()
2900
2944
0 commit comments