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
- Compute predictions on provided data.
- Compute class probabilities on provided data only for classifier model.
Predictions are allocated to variables, so can be later used to compute performance metrics.
Example Python notebooks
Please find inspiration in example notebooks
Scikit-learn cookbook
Code recipes from Scikit-learn cookbook.
- « Previous
- Train Model
- Next »
- Visualize Decision Tree