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

Challenge: 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

  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.

Tarefa

  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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

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

Challenge: 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

  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.

Tarefa

  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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

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

Challenge: 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

  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.

Tarefa

  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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

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

  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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 4. Capítulo 3
Mude 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