Skip to main content
AI & ML Code Reorder Hard +35 XP

ML Pipeline

Arrange the standard ML workflow.

Click lines in the correct order

Available lines4 left

Your order

Click lines above to build your solution.

Show answer and explanation

Answer: df = pd.read_csv("data.csv") X_train, X_test, y_train, y_test = train_test_split(X, y) model.fit(X_train, y_train) model.evaluate(X_test, y_test)

Load data, split it, train the model, then evaluate. Always evaluate on held-out test data.

Hint: You can't train before loading, can't evaluate before training.

What this challenge tests

Code Reorder in AI & ML: workflow, sklearn.

Related challenges