Learning Algorithms#
random variables matrix vector eignevector
what is machine learning?#
์ ํต์ ์ธ ํ๋ก๊ทธ๋๋ฐ์ (rule based) explicit programming
์ด์๋ค. ์ฆ ํน์ ์กฐ๊ฑด์์ ํน์ ๊ฒฐ๊ณผ๋ฅผ ๋์ถํ๋ ๋ฐฉ์์ด์๋ค. ํ์ง๋ง ์ด๋ฐ ๋ฐฉ์์ ๊ท์น์ ๋ง๋๋ ๊ฒ์ด ์ด๋ ต๊ณ , ๊ท์น์ด ๋ณต์กํด์ง๋ฉด ๋ณต์กํด์ง์๋ก ๊ท์น์ ๋ง๋๋ ๊ฒ์ด ์ด๋ ค์์ง๋ค. ๋ํ ๊ท์น ๊ธฐ๋ฐ์ ํ๋ก๊ทธ๋๋ฐ์ ๊ทธ ๊ท์น๋ค์ ํผํ ๋ณ์น๋ค์ ๋ชจ๋ ์ปค๋ฒํด์ผ ํ๋๋ฐ ๊ทธ๊ฒ์ ์ฌ์ค์ ์ด๋ ต๋ค. ๊ทธ๋ ๊ธฐ ๋๋ฌธ์ ๊ธฐ๊ณ๊ฐ ์ค์ค๋ก pattern์ learning
ํ๋ ์ ๊ทผ๋ฒ์ด ๋ฑ์ฅํ๋๋ฐ, ๊ทธ๊ฒ์ด Machine learning์ด๋ค.
Definition of machine learning#
Field of study that gives computers the ability to learn without being explicitly programmed
โ Machine learning Definition by Arthur Samuel 1959
A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E.
โ Tom Mitchell 1998 well-posed learning problem
Supervised learning ์ง๋ ํ์ต#
๊ฐ์ฅ ๊ธฐ๋ณธ์ ์ธ ๋จธ์ ๋ฌ๋ ํด์ supervised learning ์ง๋ํ์ต ์ด๋ค. Given a dataset with inputs X and labels Y, learn a mapping from X to y. ์ฆ, ํน์ input(X)์ ๋ํด์ label or targe(y) output์ด ์ฃผ์ด์ง ๋ฐ์ดํฐ์ ์ด ์ฃผ์ด์ง ๊ฒฝ์ฐ๋ฅผ ๋งํ๋ค. ์ปดํจํฐ๋ ์ด X์ y ์ฌ์ด์ ๊ด๊ณ๋ฅผ ํ์ต ๋ฐ ์ ์ถ๋ฅผ ํ๊ฒ ๋๋ค. ์ง๋ํ์ต์ ํฐ ๋ถ๋ฅ๋ regression ๊ณผ classification์ด ์๋ค.
Regression ํ๊ท#
the value y yorโre trying to predict is continuous
โAndrew Ng
ํ๊ท๋ output y์ ๊ฐ์ด ์ฐ์์ ์ธ ์ฆ continuousํ ๊ฐ์ ๊ฐ์ง๋ ๊ฒ์ ๋งํ๋ค. ์๋ฅผ ๋ค์ด์ ์ง์ ํฌ๊ธฐ์ ๋ฐ๋ฅธ ์ง๊ฐ์ ์์ธกํ๋ ๊ฒ์ด ํ๊ท ๋ฌธ์ ์ด๋ค. ์ง์ ํฌ๊ธฐ๋ ์ฐ์์ ์ธ ๊ฐ์ด๊ธฐ ๋๋ฌธ์ ํ๊ท ๋ฌธ์ ์ด๋ค. ๋ฐ๋ฉด์ ์ง์ ํฌ๊ธฐ์ ๋ฐ๋ผ์ ์ง์ด ์๋ ๋๋ค๋ฅผ ์์ธกํ๋ ๊ฒ์ classification ๋ฌธ์ ์ด๋ค. ๋๋ค๋ ์ฐ์์ ์ธ ๊ฐ์ด ์๋๊ธฐ ๋๋ฌธ์ด๋ค.
์กฐ๊ธ ๋ ๋์๊ฐ์ Lienar regression์ ์ด๋ค ์๋ฏธ์ผ๊น? ์ ํ ํ๊ท๋ ๋ฐ์ดํฐ๋ฅผ ๊ฐ์ฅ ์ ํํํ ์ ์๋ ์ ํ ํจ์๋ฅผ ์ฐพ๋ ๊ฒ์ด๋ค. ์ ํ์ ์๋ฏธ input x์ ๊ฐ์ ๋ณํ์ ๋ฐ๋ผ์ ์์ธก๊ฐ๋ฅํ๊ฒ output y์ ๊ฐ์ด ์ด๋ป๊ฒ ๋ณํํ๋์ง๋ฅผ ๋ํ๋ด๋ ๊ฒ์ด๋ค. ์ฆ input x์ ๊ฐ์ ๋ณํ์ ๋ฐ๋ผ y ๊ฐ์ ์ข
์์ ์ผ๋ก ๋ณํจ์ผ๋ก x๋ ๋
๋ฆฝ ๋ณ์
์ด๊ณ y๋ ์ข
์ ๋ณ์
๋ผ๊ณ ํํํ ์ ์๋ค.
์ ํ ํ๊ท๋ ๋ค์๊ณผ ๊ฐ์ ํํ๋ฅผ ๊ฐ์ง๋ค.
์ฌ๊ธฐ์ \(w\)๋ weight, \(b\)๋ bias์ด๋ค. ์ด๊ฒ์ ํ๋ ฌ๋ก ํํํ๋ฉด ๋ค์๊ณผ ๊ฐ๋ค.
์๋ง 2๊ฐ์์ ๋ ์์ธํ๊ฒ ๋ค๋ฃฐ ๋ฏํ๋ค.
Classification ๋ถ๋ฅ#
classification refers to that y takes on a discrete number of variables
ํ๋์ feature ์ฆ ํน์ฑ์ผ๋ก plotํ๋ ๊ฒ์ ์ฝ์ง๋ง, ํ์ค์ ์ผ๋ก ์ด๋ค ๋ฐ์ดํฐ๋ฅผ ๋ถ์ํ๊ธฐ ์ํด์๋ ์ฌ๋ฌ feature๋ค๊ณผ y์ ๊ด๊ณ๋ฅผ mappingํ๋๊ฒ ๋๋ถ๋ถ์ ๊ฒฝ์ฐ์ผ ๊ฒ์ด๋ค.
๊ทธ๋ฐ ๊ฒฝ์ฐ์๋ ์ด๋ค feature๊ฐ ์ค์ํ์ง feature extracting์ ํ๊ธฐ๋ ํ๊ณ , feature๋ค์ ์กฐํฉํด์ ์๋ก์ด feature๋ฅผ ๋ง๋ค๊ธฐ๋ ํ๋ค. ์ด๋ ๊ฒ feature๋ค์ ์กฐํฉํด์ ์๋ก์ด feature๋ฅผ ๋ง๋ค์ด๋ด๋ ๊ฒ์ feature engineering
์ด๋ผ๊ณ ํ๋ค.
๋ํ
svm์ ๋ฌดํ๋์ input features๋ฅผ ์ฌ์ฉํ๋ค? kernels ๋ฅผ ๋์ค์ ์ฌ์ฉํด์ ๋ฌดํ๋์ ์ ๋ณด๋ฅผ ๋จธ์ ๋ฌ๋์ ์ด์ฉํ ์ ์๋ ๋ฐฉ๋ฒ์ ๋์ค์ ๋์จ๋ค๊ณ ํ๋ค.
Unsupervised learning ๋น์ง๋ ํ์ต#
just input x, no labels
k-means clustering
๊ตฌ๊ธ ๋ด์ค๋ ๋งค์ผ์ ๋ด์ค๋ฅผ ํด๋ฌ์คํฐ๋งํด์ ๋น์ทํ ๋ด์ค๋ค ๋ผ๋ฆฌ ๋ฌถ๋ ๊ฒ์์ ์๋ฅผ ๋ค ์ ์๋ค.
Organize computing clusters
social network analysis
market segmentation
astronomical data analysis
Reinforcement learning ๊ฐํํ์ต#
if behaves well, โgood dogโ compliment
๊ฐ๋ฅผ ํค์ฐ๋ ๊ฒ๊ณผ ๋น์ทํ๋ค. ๊ฐ๊ฐ ์ํ๋ฉด ์นญ์ฐฌ์ ํด์ฃผ๊ณ ์๋ชปํ๋ฉด ํผ๋ด์ฃผ๋ ๊ฒ์ฒ๋ผ. ์๊ฐ์ด ์ง๋จ์ ๋ฐ๋ผ ์ํ๋ฉด ์์ ์ฃผ๋ ๋ฐฉ์์ผ๋ก ์งํ๋๋ค. ๊ฒ์ ํ๋ ์์์ ์ด๋ฐ ์ ํ์ ๋ง์ด ๋ณผ ์ ์๋ค.