Learn practical skills, build real-world projects, and advance your career

Classification with Random Forests

from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import RandomForestClassifier
from utils import load_data, draw_tree
import seaborn as sns
sns.set_style("darkgrid", {"figure.facecolor": '#cccccc00'})

We begin by importing the data. For this example, we'll use three columns: "yaw", "pitch" and "roll".

cols = ['yaw', 'pitch', 'roll']
X, y = load_data(cols)
sns.scatterplot(data=X);
Notebook Image