Title: Lab 2, assignment 1: OLS regression of electricity consumption on temperature at 53 sites
1Lab 2, assignment 1 OLS regression of
electricity consumption on temperature at 53 sites
2SAS code for ridge regression
proc reg datamining.dailytemperature outest
dtempbeta ridge0 to 10 by 1 model
daily_consumption stockholm g_teborg malm_
/p output outolsoutput predolspred proc print
datadtempbeta run
3Estimated regression parameters in ridge
regression
4Predicted vs observed values in OLS regression
and ridge regression- trade-off between variance
and bias
5Fat content vs absorbance in different channels
(wavelengths)
6OLS regression fat vs channel10, channel30,
channel50, channel70, channel90
7OLS regression fat vs channel1 channel 100
8OLS regression fat vs channel1 channel 100
9OLS regression with strongly correlated predictors
If the XTX matrix has not full rank (some
X-variables are linearly dependent) the mean
square solution is not unique If the X-variables
are strongly correlated, then (i) the
regression coefficients will be uncertain (ii)
the predictions may be OK
10Principal Component Analysis of lake survey data
Some variables vary much more than others How
does this influence principal components derived
from the covariance and correlation matrices,
respectively?
11Principal Component Analysis of lake survey
data- score plot derived from the correlation
matrix
12Principal Component Analysis of lake survey
data- eigenvectors derived from the correlation
matrix
13Principal Component Analysis of lake survey data
with outliers removed- score plot derived from
the correlation matrix
14Principal Component Analysis of lake survey data
with outliers removed - eigenvectors derived
from the correlation matrix
15Principal Component Analysis of lake survey data
with outliers removed- MINITAB score plot
derived from the correlation matrix
16Principal Component Analysis of lake survey data
with outliers removed - MINITAB loading plot
derived from the correlation matrix
17Regression of an indicator matrix
Find a linear function which is (on average) one
for objects in class 1 and otherwise (on average)
zero Find a linear function which is (on
average) one for objects in class 1 and otherwise
(on average) zero
Assign a new object to class 1 if
18Discriminant analysis- decision border
193D-plot of an indicator matrix for class 1
203D-plot of an indicator matrix for class 2
21Regression of an indicator matrix-
discriminating function
Estimate discriminant functions for each class,
and then classify a new object to the class with
the largest value for its discriminant function
22Linear discriminant analysis (LDA)
LDA is an optimal classification method when the
data arise from Gaussian distributions with
different means and a common covariance matrix