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

Contenido del 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:

Tarea

  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.

Tarea

  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.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

Sección 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:

Tarea

  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.

Tarea

  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.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

Sección 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:

Tarea

  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.

Tarea

  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.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo 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:

Tarea

  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.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
Sección 4. Capítulo 3
Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
We're sorry to hear that something went wrong. What happened?
some-alt