Skip to main content
AI & ML Code Completion Easy +10 XP

Predict Method

Complete the prediction call.

AI & MLFill in the blank
model.fit(X_train, y_train)
predictions = model.___(X_test)

Type the missing code

Show answer and explanation

Answer: predict

predict() generates output labels/values for new input data after the model has been trained with fit().

Hint: Which method generates predictions from a trained model?

What this challenge tests

Code Completion in AI & ML: sklearn, prediction.

Related challenges