03 Regression
03 Regression
Botao Jiao
Review
• Last week:
• Artificial neurons
Binary Classification
Distinguish 2 classes
For example, we might want to classify data into categories like yes/no, true/false, or
positive/negative. The key idea here is that there are only two possible outcomes, and our
task is to decide which one the data belongs to.
Evaluation Methods: Confusion Matrix
TP FP TP= true positive correctly predicts the negative class, like marking a
Predicted
By connecting several neurons, we create a network that can process more information and make more
accurate decisions. This is how we build powerful models that can solve difficult problems, like recognizing
images or understanding speech.
Frank Rosenblatt, The perceptron, a perceiving and recognizing automaton Project Para. Cornell Aeronautical Laboratory, 1957
Today’s Topics
• Regression applications
• Background: notation
• Linear regression
• Polynomial regression
• Background: notation
• Linear regression
• Polynomial regression
Demo: https://www.youtube.com/watch?time_continue=6&v=0bEJO4Twgu4&feature=emb_logo
https://emerj.com/ai-sector-overviews/artificial-intelligence-applications-lending-loan-management/
What Else to Predict?
Insurance Cost Public Opinion
Class Ratings
• Background: notation
• Linear regression
• Polynomial regression
Example:
Example:
Example:
Example:
Prediction Model
Cost: $725,000
Predicted Cost: ?
Regression Evaluation Metrics
Results: e.g., • Mean absolute error
Regression Evaluation Metrics
Results: e.g., • Mean absolute error
Today’s Topics
• Regression applications
• Background: notation
• Linear regression
• Polynomial regression
• Background: notation
• Linear regression
• Polynomial regression
Predicted value
“Simple” Linear Regression Model
• Formula: (Line)
Feature vector
Target
• How many features are there?
• 1
(Plane)
Feature vector
• How many features are there?
• 2
• Weight coefficients:
• Indicates how much the predicted value will vary when that feature varies
while holding all the other features constant
Linear Regression Model: Learning Parameters
https://www.nctm.org/Classroom-Resources/Illuminations/Interactives/Line-of-Best-Fit/
Today’s Topics
• Regression applications
• Background: notation
• Linear regression
• Polynomial regression
Predicted value
Feature vector