Al correr este código en jupyter:
def plot_feature_importances_cancer(model):
n_features = cancer.data.shape[1]
plt.barh(range(n_features), model.feature_importances_, align='center')
plt.yticks(np.arange(n_features), cancer.feature_names)
plt.xlabel("Feature importance")
plt.ylabel("Feature")
plot_feature_importances_cancer(tree)
aparece este error:
File "<ipython-input-19-a558f64f826a>", line 2
File "<ipython-input-19-a558f64f826a>", line 2
n_features = cancer.data.shape[1]
^
IndentationError: expected an indented block
Estoy trabajando en windowsWindows 7