Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Implementing a Random Forest | Random Forest
Classification with Python
course content

Conteúdo do Curso

Classification with Python

Classification with Python

1. k-NN Classifier
2. Logistic Regression
3. Decision Tree
4. Random Forest
5. Comparing Models

bookChallenge: Implementing a Random Forest

In this chapter, you will build a Random Forest using the same titanic dataset.

Also, you will calculate the cross-validation accuracy using the cross_val_score() function

In the end, you will print the feature importances.
The feature_importances_ attribute only holds an array with importances without specifying the name of a feature.
To print the pairs ('name', importance), you can use the following syntax:

Tarefa
test

Swipe to show code editor

  1. Import the RandomForestClassifier class.
  2. Create an instance of a RandomForestClassifier class with default parameters and train it.
  3. Print the cross-validation score with the cv=10 of a random_forest you just built.
  4. Print each feature's importance along with its name.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 4. Capítulo 3
toggle bottom row

bookChallenge: Implementing a Random Forest

In this chapter, you will build a Random Forest using the same titanic dataset.

Also, you will calculate the cross-validation accuracy using the cross_val_score() function

In the end, you will print the feature importances.
The feature_importances_ attribute only holds an array with importances without specifying the name of a feature.
To print the pairs ('name', importance), you can use the following syntax:

Tarefa
test

Swipe to show code editor

  1. Import the RandomForestClassifier class.
  2. Create an instance of a RandomForestClassifier class with default parameters and train it.
  3. Print the cross-validation score with the cv=10 of a random_forest you just built.
  4. Print each feature's importance along with its name.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 4. Capítulo 3
toggle bottom row

bookChallenge: Implementing a Random Forest

In this chapter, you will build a Random Forest using the same titanic dataset.

Also, you will calculate the cross-validation accuracy using the cross_val_score() function

In the end, you will print the feature importances.
The feature_importances_ attribute only holds an array with importances without specifying the name of a feature.
To print the pairs ('name', importance), you can use the following syntax:

Tarefa
test

Swipe to show code editor

  1. Import the RandomForestClassifier class.
  2. Create an instance of a RandomForestClassifier class with default parameters and train it.
  3. Print the cross-validation score with the cv=10 of a random_forest you just built.
  4. Print each feature's importance along with its name.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

In this chapter, you will build a Random Forest using the same titanic dataset.

Also, you will calculate the cross-validation accuracy using the cross_val_score() function

In the end, you will print the feature importances.
The feature_importances_ attribute only holds an array with importances without specifying the name of a feature.
To print the pairs ('name', importance), you can use the following syntax:

Tarefa
test

Swipe to show code editor

  1. Import the RandomForestClassifier class.
  2. Create an instance of a RandomForestClassifier class with default parameters and train it.
  3. Print the cross-validation score with the cv=10 of a random_forest you just built.
  4. Print each feature's importance along with its name.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 4. Capítulo 3
Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
We're sorry to hear that something went wrong. What happened?
some-alt