CSE 163
Machine Learning
��Hunter Schafer
This Time
Last Time
2
Terms
3
Features Matter
4
Decision Tree
5
Code Recap
General ML pipeline (at least to start)
6
# Separate data
features = data.loc[:, data.columns != 'target']
labels = data['target']
# Create and train model
model = DecisionTreeClassifier()
model.fit(features, labels)
# Predict on some data
predictions = model.predict(features)
# Assess accuracy
accuracy_score(labels, predictions)
Group Work:
Best Practices
When you first working with this group:
Tips:
7
Practice Session 1
TAs will walk around to answer questions! Raise your hand!
Come back at 11:55!
8
Practice Session 2
TAs will walk around to answer questions! Raise your hand!
Come back at 12:15!
9