Lecture 8 Applications
Lecture 8 Applications
Nicholas Ruozzi
University of Texas at Dallas
Function Fitting: ML Applications
• A wide variety of machine learning problems can be cast as
function fitting problems
2
L1 Regression
• Suppose that instead of a squared error, we wanted to minimize
the absolute error?
3
L1 Regression
• Suppose that instead of a squared error, we wanted to minimize
the absolute error?
subject to
5
Sparse Least Squares Regression
6
Sparse Least Squares Regression
subject to
7
Maximum Likelihood Estimation
• When fitting a statistical model to data, the principle of
maximum likelihood estimation posits that the best fit model is
the one that generates the data with highest probability
• Example: suppose that you roll a biased 6-sided die 100 times
and observe a sequence of outcomes, e.g.,
8
Maximum Likelihood Estimation
• Example: suppose that you roll a biased 6-sided die 100 times
and observe a sequence of outcomes, e.g.,
• A biased die is described by 6 numbers such that
9
Maximum Likelihood Estimation
subject to
10
Maximum Likelihood Estimation
subject to
11
Maximum Likelihood Estimation
subject to
12
Stochastic Gradient Descent
• These types of problems often can be written as minimizing a
sum of a, perhaps large, number of terms:
• Approximate the gradient of a sum by sampling a few indices (as
few as one) uniformly at random and averaging
13
Stochastic Gradient Descent
• These types of problems often can be written as minimizing a
sum of a, perhaps large, number of terms:
• Approximate the gradient of a sum by sampling a few indices (as
few as one) uniformly at random and averaging Expectation
taken over
the random
Each is sampled uniformly at random from
samples
• Stochastic gradient descent converges to the global optimum
under certain assumptions on the step size
14
SGD for Least Squares
• Update
15
Stochastic Gradient Descent
16
Logistic Regression
Given and ,
17
Logistic Regression
Given and ,
18
Logistic Regression
Given and ,
Newton’s Method:
19
Logistic Regression
Given and ,
Newton’s Method:
20
Logistic Regression
Given and ,
Newton’s Method:
21
Solving Linear Systems
22
Solving Linear Systems
subject to
23
Solving Linear Systems
subject to
24
Sparse Linear Systems
subject to
25
Sparse Linear Systems
subject to
26