Statistical learning : a vast set of tools for understanding data
-1. supervised : input O, output O
2. unsupervised : input 0, output Xwe can learn relationships and structure from such data.
datasets : continuous or quantitative output
Credit:
Information credit card debt for 400 customers
Default : 연채,채무불이행
Customer default records for a credit card company
Advertising :
sales of that product in 200 diferent markets
along with advertising budgets for the product in
each of those markets for three diferent media: TV, radio, and newspape
GOAL :
our goal is to develop an accurate model
that can be used to predict sales on the basis of the three media budgets.
Income datasets
income (in thousands of dollars) and years of education for 30 individuals.
: The blue curve represents the true underlying relationship between income
and years of education, which is generally unknown
The black lines represent the error associated
with each observation. Note that some errors are positive and some are negative
What Is Statistical Learning?
input variables (predictors, independent variables, features) : the advertising budgets ,X1= TV budgets, X2= radio , X3 newspaper
p : number of diferent predictors, X1, X2,...,Xp.
output variable(response , dependent variable) : sales Y
We assume that there is some
relationship between Y and X = (X1, X2,...,Xp)
which can be written
in the very general form
Y = f(X) + "엡실론"
f : is some fxed but unknown function of X1,...,Xp
엡실론 : is a random error term, : independent of X and has mean zero.
f 는원래 모름. 추정해야함. 하지만 income데이터셋은 만든것이고, f에서 만든것이므로 f는 우리가 알고있음 하지만원래는못구함.
ESTIMATE f!!
The accuracy of Yˆ as a prediction for Y depends on two quantities,
which we will call the reducible error and the irreducible error.
reducible error ˆf와 f의 차이. 적절한매개변수수정으로 ^F를 F로 바꿀수있음
irreducible error, Y=F +앱실론이므로. 어쩔수없이 오차남. 못줄임. 실험실 측정 오차같은거임. 우리가 알수가없음 어디서난오차인지.
E(Y − Yˆ )2 represents the average, or expected value,
참고사항) We will always assume that we have observed a set of n diferent
data points.
These observations are called the training data (n)
Let xij
represent the value of the jth predictor, or input, for observation i, where
i = 1, 2,...,n and j = 1, 2,...,p.
let yi
!!!!!!!!!!!!
우리의 목표: 훈련데이터로 훈련해서 f추정하기.. ˆf찾기
Our goal is to apply a statistical learning method to the training data
in order to estimate the unknown function f.
목표이루는법
1. 모수적방법(모델쓰는방법)
-모수적방법의 한계 :
모델잘못선택하면 꽝~. 모델이 즉 식이 별로일수도~..
-해결책은 ? : 유연한 모델을 쓰자~
하지만 유연한모델은 파라미터수가 너무많아~ 오버피팅될수도? 노이즈 .즉 에러를 학습할수도있어.
2. 비모수적 방법.(함수안슴)
f : gets as close to the data point
f 틀리지않음
한계점 : 모수보다 더많은 관측갑필요 . 왜냐하면 매개변수문제로 축소안하니까.
In order to ft a thin-plate
spline, the data analyst must select a level of smoothness. : rougher ft.
This is an example of overftting the
data
#############
The Trade-Of Between Prediction Accuracy and Model
Interpretability
fexible : they can generate a much wider range of possible shapes to estimate f (굴곡심한애들.은 추정치 다양, 선형애들은 굴곡X니 추청치 적음)
해석력. 즉 intention이 목표면 X 와 Y관계설명은 복잡한모델은 힘듬. 그러나 선형같은 모델은 이야기하기 쉬움.
!!!추론이냐 예측이냐!!
클러스터링! but 너무 겹치면 애매.
qualitative (also quantitative
qualitative known as categorical
########
Measuring the Quality of Fit
how well its predictions?
회귀 : mean squared error (MSE),
MSE는 실제 y값과 ^f(x)(예측값)의 차의제곱의 평균
testmse가 더중요