CSE 163
Machine Learning�
Suh Young Choi�
🎶 Listening to: Mariusz Duda
💬 Before Class: Do you have a favorite tree?
Last Time
This Time
2
Updates & Reminders
Reading Assignment 4 is out on Canvas/Hypothesis now
THA 4 is due tomorrow (2/12)
Checkpoints and Reading Assignments will open for submissions after initial grades are released
Suh Young will not be here next week!
3
Checking in
Advanced material / Out-of-scope deductions
Resubmission Policy
4
Terms
5
Features Matter
6
Decision Tree
7
Code Recap�(classification)
General ML pipeline (at least to start)
8
# 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)
Code Recap�(regression)
General ML pipeline (at least to start)
9
# Separate data
features = data.loc[:, data.columns != 'target']
labels = data['target']
# Create and train model
model = DecisionTreeRegressor()
model.fit(features, labels)
# Predict on some data
predictions = model.predict(features)
# Assess MSE
mean_squared_error(labels, predictions)
Group Work:
Best Practices
When you first working with this group:
Tips:
10
Next Time
Before Next Time
11