Computer scienceData scienceInstrumentsScikit-learnTraining ML models with scikit-learnClassification in scikit-learn

Random forest in scikit-learn

OOB score

Report a typo

Let's use the opportunity to evaluate RF model without a test subset. It allows us to fit the model on all the data that we have.

Now we have to get the OOB score of a model.

In order to complete the task, follow these steps:

  1. Load the iris flower dataset.
  2. Create an instance of RandomForestClassifier model with the following parameters: n_estimators=17, max_features='sqrt', random_state=774, oob_score=True. Then, fit it using all the data.
  3. Get the OOB score from the corresponding attribute oob_score_.

Write the value of the OOB score of this model. Round it to four digits after the decimal point.

Enter a number
___

Create a free account to access the full topic