text_html_output_1.png
from sklearn.ensemble import RandomForestClassifier

from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import mean_absolute_error
final_model = RandomForestClassifier(max_leaf_nodes=7, random_state=0)
y_pred = final_model.fit(x_treino, y_treino)
accuracy = final_model.score(x_teste, y_teste)
print(accuracy)