make_pipeline(StandardScaler(), LogisticRegression()) is built. What keys does named_steps expose?
Correct answer
D. standardscaler and logisticregression, the lowercased class names
19 views
D. standardscaler and logisticregression, the lowercased class names
19 views
make_pipeline generates names automatically by lowercasing each estimator's class name, which is why grid search keys look like logisticregression__C. Pipeline, by contrast, requires an explicit list of name and estimator tuples, and duplicate automatic names would collide. Use set_params with the double-underscore syntax to reach nested parameters.
Asked in: NTS, PPSC IT, Interviews
Not sure why the answer is D? Ask here and get an explanation.