Scikit-learn

Compute Predictions

Compute output values on provided data with Machine Learning model. Predictions are allocated to variable, so they can be later used to compute performance metrics. Additionally, class probabilities are computed for classifiers.

classificationregressionfit

Required packages

You need below packages to use the code generated by recipe. All packages are automatically installed in MLJAR Studio.

scikit-learn>=1.5.0

Interactive recipe

You can use below interactive recipe to generate code. This recipe is available in MLJAR Studio.

In the below recipe, we assume that you have following variables available in your notebook:

  • my_classifier (type DecisionTreeClassifier)
  • my_regressor (type DecisionTreeRegressor)
  • test_data (type DataFrame)

Python code

# Python code will be here

Code explanation

  1. Compute predictions on provided data.
  2. Compute class probabilities on provided data only for classifier model.

Predictions are allocated to variables, so can be later used to compute performance metrics.

« Previous
Train Model