@@ -252,7 +252,7 @@ def _fit(
252
252
dtype = DTYPE , accept_sparse = "csc" , ensure_all_finite = False
253
253
)
254
254
check_y_params = dict (ensure_2d = False , dtype = None )
255
- if y is not None or self .__sklearn_tags__ ().requires_y :
255
+ if y is not None or self .__sklearn_tags__ ().required :
256
256
X , y = validate_data (
257
257
self , X , y , validate_separately = (check_X_params , check_y_params )
258
258
)
@@ -1375,7 +1375,15 @@ def partial_fit(self, X, y, sample_weight=None, check_input=True, classes=None):
1375
1375
self : DecisionTreeClassifier
1376
1376
Fitted estimator.
1377
1377
"""
1378
- self ._validate_params ()
1378
+ X , y = validate_data (
1379
+ self ,
1380
+ X ,
1381
+ y ,
1382
+ multi_output = True ,
1383
+ accept_sparse = "csc" ,
1384
+ dtype = DTYPE ,
1385
+ ensure_all_finite = False ,
1386
+ )
1379
1387
1380
1388
# validate input parameters
1381
1389
first_call = _check_partial_fit_first_call (self , classes = classes )
@@ -1398,7 +1406,11 @@ def partial_fit(self, X, y, sample_weight=None, check_input=True, classes=None):
1398
1406
check_X_params = dict (dtype = DTYPE , accept_sparse = "csc" )
1399
1407
check_y_params = dict (ensure_2d = False , dtype = None )
1400
1408
X , y = validate_data (
1401
- self , X , y , reset = False , validate_separately = (check_X_params , check_y_params )
1409
+ self ,
1410
+ X ,
1411
+ y ,
1412
+ reset = False ,
1413
+ validate_separately = (check_X_params , check_y_params ),
1402
1414
)
1403
1415
if issparse (X ):
1404
1416
X .sort_indices ()
0 commit comments