File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -228,12 +228,12 @@ def cd_solver(
228
228
if len (w ) != n_features + fit_intercept :
229
229
if fit_intercept :
230
230
val_error_message = (
231
- "Inconsistent size of coefficients with n_features + 1\n "
232
- f"expected { n_features + 1 } , got { len (w )} " )
231
+ "w should be of size n_features + 1 when using fit_intercept=True: "
232
+ f"expected { n_features + 1 } , got { len (w )} . " )
233
233
else :
234
234
val_error_message = (
235
- "Inconsistent size of coefficients with n_features\n "
236
- f"expected { n_features } , got { len (w )} " )
235
+ "w should be of size n_features: "
236
+ f"expected { n_features } , got { len (w )} . " )
237
237
raise ValueError (val_error_message )
238
238
239
239
for t in range (max_iter ):
Original file line number Diff line number Diff line change @@ -72,12 +72,12 @@ def group_bcd_solver(
72
72
if len (w ) != n_features + fit_intercept :
73
73
if fit_intercept :
74
74
val_error_message = (
75
- "Inconsistent size of coefficients with n_features + 1\n "
76
- f"expected { n_features + 1 } , got { len (w )} " )
75
+ "w should be of size n_features + 1 when using fit_intercept=True: "
76
+ f"expected { n_features + 1 } , got { len (w )} . " )
77
77
else :
78
78
val_error_message = (
79
- "Inconsistent size of coefficients with n_features\n "
80
- f"expected { n_features } , got { len (w )} " )
79
+ "w should be of size n_features: "
80
+ f"expected { n_features } , got { len (w )} . " )
81
81
raise ValueError (val_error_message )
82
82
83
83
datafit .initialize (X , y )
Original file line number Diff line number Diff line change @@ -222,12 +222,12 @@ def multitask_bcd_solver(
222
222
if W .shape [0 ] != n_features + fit_intercept :
223
223
if fit_intercept :
224
224
val_error_message = (
225
- "Inconsistent size of coefficients with n_features + 1\n "
226
- f"expected { n_features + 1 } , got { W .shape [0 ]} " )
225
+ "W.shape[0] should be n_features + 1 when using fit_intercept=True: "
226
+ f"expected { n_features + 1 } , got { W .shape [0 ]} . " )
227
227
else :
228
228
val_error_message = (
229
- "Inconsistent size of coefficients with n_features\n "
230
- f"expected { n_features } , got { W .shape [0 ]} " )
229
+ "W.shape[0] should be of size n_features: "
230
+ f"expected { n_features } , got { W .shape [0 ]} . " )
231
231
raise ValueError (val_error_message )
232
232
233
233
is_sparse = sparse .issparse (X )
You can’t perform that action at this time.
0 commit comments