Why must the first call to partial_fit on a classifier include the classes argument?
Correct answer
C. The estimator must fix the label set before it can map scores to columns
22 views
C. The estimator must fix the label set before it can map scores to columns
22 views
partial_fit updates an estimator incrementally, so the first batch may not contain every class and the model cannot infer the full label set from it. Passing classes fixes the output dimension of predict_proba across batches and keeps the column order stable. Omitting it raises a ValueError on the first call, and failing to shuffle between epochs biases the online update.
Asked in: NTS, PPSC IT, Interviews
Not sure why the answer is C? Ask here and get an explanation.