์ „์ฒด ๊ธ€

I'm Game Challenger
๐Ÿ“‡ Machine Learning

[ML] Hierarchical Clustering (๊ณ„์ธต์  ๊ตฐ์ง‘ ๋ถ„์„)

Hierarchical Clustering (๊ณ„์ธต์  ๊ตฐ์ง‘ ๋ถ„์„)๋„ Unsupervised Learning (๋น„์ง€๋„ ํ•™์Šต) ๊ณ„์ธต์  ๊ตฐ์ง‘ ๋ถ„์„์€ ๋ฐ์ดํ„ฐ ํฌ์ธํŠธ๋“ค ๊ฐ„์˜ ์œ ์‚ฌ๋„๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ๊ณ„์ธต์ ์ธ ๊ตฐ์ง‘ ๊ตฌ์กฐ๋ฅผ ํ˜•์„ฑํ•˜๋Š” ๊ตฐ์ง‘ํ™” ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค.์ด ๋ฐฉ๋ฒ•์€ ๋ฐ์ดํ„ฐ๋ฅผ ํŠธ๋ฆฌ ๊ตฌ์กฐ๋กœ ํ‘œํ˜„ํ•˜๋ฉฐ, ๋‹จ๊ณ„๋ณ„๋กœ ๊ตฐ์ง‘ํ™”๋ฅผ ์ง„ํ–‰ํ•จ์œผ๋กœ์จ ๋ฐ์ดํ„ฐ ๊ฐ„์˜ ๊ด€๊ณ„์™€ ๊ตฌ์กฐ๋ฅผ ์ดํ•ดํ•˜๋Š” ๋ฐ ๋„์›€์„ ์ค๋‹ˆ๋‹ค.Hierarchical Clustering (๊ณ„์ธต์  ๊ตฐ์ง‘ ๋ถ„์„)์˜ ์œ ํ˜•๊ทธ๋Ÿฌ๋ฉด, Hierarchical Clustering (๊ณ„์ธต์  ๊ตฐ์ง‘ ๋ถ„์„)์˜ ์œ ํ˜•์€ ์–ด๋– ํ•œ ๊ฒƒ์ด ์žˆ์„๊นŒ์š”? ํ•œ๋ฒˆ ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. 1. ๋ณ‘ํ•ฉ์  ๊ตฐ์ง‘ํ™” (Agglomerative Clustering)๋ณ‘ํ•ฉ์  ๊ตฐ์ง‘ํ™”๋Š” ๊ฐ ๋ฐ์ดํ„ฐ๋ฅผ ํ•˜๋‚˜์˜ ๊ตฐ์ง‘์œผ๋กœ ์‹œ์ž‘ํ•˜์—ฌ, ๊ฐ€์žฅ ๊ฐ€๊นŒ์šด ๊ตฐ์ง‘๋“ค์„ ๋ฐ˜๋ณต์ ์œผ๋กœ ๋ณ‘ํ•ฉํ•ด..

๐Ÿ“‡ Machine Learning

[ML] K-Means Clustering (K-ํ‰๊ท  ํด๋Ÿฌ์Šคํ„ฐ๋ง)

์•ž์— ๊ธ€์—์„œ ๋น„์ง€๋„ํ•™์Šต์˜ ๊ธฐ๋ฒ•๋“ค์— ๋ฐํ•˜์—ฌ ์•Œ์•„๋ณด์•˜์Šต๋‹ˆ๋‹ค.์ด๋ฒˆ์—๋Š” ๊ทธ ์ค‘ ํ•˜๋‚˜์ธ  K-Means Clustering (K-ํ‰๊ท  ํด๋Ÿฌ์Šคํ„ฐ๋ง)์— ๋ฐํ•˜์—ฌ ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. K-ํ‰๊ท  ํด๋Ÿฌ์Šคํ„ฐ๋ง์€ ๋ฐ์ดํ„ฐ๋ฅผ K๊ฐœ์˜ ๊ตฐ์ง‘์œผ๋กœ ๋‚˜๋ˆ„์–ด ๊ฐ ๋ฐ์ดํ„ฐ ํฌ์ธํŠธ๋ฅผ ์œ ์‚ฌํ•œ ํŠน์„ฑ์„ ๊ฐ€์ง„ ๊ทธ๋ฃน์œผ๋กœ ๋ฌถ๋Š” ๊ตฐ์ง‘ํ™” ์•Œ๊ณ ๋ฆฌ์ฆ˜์ž…๋‹ˆ๋‹ค.์ด๋ฅผ ํ†ตํ•ด ๋ฐ์ดํ„ฐ์˜ ๊ตฌ์กฐ๋ฅผ ์ดํ•ดํ•˜๊ณ , ๋ฐ์ดํ„ฐ ๋ถ„์„ ๋ฐ ์‹œ๊ฐํ™”๋ฅผ ์šฉ์ดํ•˜๊ฒŒ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.K-Means Clustering์˜ ํŠน์ง•K-ํ‰๊ท  ํด๋Ÿฌ์Šคํ„ฐ๋ง์˜ ํŠน์ง•์€ ์—ฌ๋Ÿฌ๊ฐœ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ํ•œ๋ฒˆ ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. 1. ๊ตฐ์ง‘ ์ˆ˜ K: ์‚ฌ์šฉ์ž๊ฐ€ ๊ตฐ์ง‘ ์ˆ˜ K๋ฅผ ์‚ฌ์ „์— ์ •์˜ํ•ด์•ผ ํ•˜๋ฉฐ, ์ด ๊ฐ’์€ ๋ชจ๋ธ์˜ ์„ฑ๋Šฅ์— ์ง๊ฒฐ๋˜๋Š” ์ค‘์š”ํ•œ ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ์ž…๋‹ˆ๋‹ค.์ ์ ˆํ•œ K๋ฅผ ์„ ํƒํ•˜๋Š” ๊ฒƒ์ด ๊ตฐ์ง‘ํ™”์˜ ์„ฑ๊ณต ์—ฌ๋ถ€์— ํฐ ์˜ํ–ฅ์„ ๋ฏธ์นฉ๋‹ˆ๋‹ค. 2. ๊ฑฐ๋ฆฌ ๊ธฐ๋ฐ˜ ์•Œ๊ณ ๋ฆฌ์ฆ˜: K..

๐Ÿ“‡ Machine Learning

[ML] Unsupervised Learning (๋น„์ง€๋„ ํ•™์Šต)

์ด๋ฒˆ์—๋Š” ๋น„์ง€๋„ ํ•™์Šต์— ๋ฐํ•˜์—ฌ ํ•œ๋ฒˆ ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.๋น„์ง€๋„ ํ•™์Šต(Unsupervised Learning)์€ ๋ ˆ์ด๋ธ”์ด ์—†๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ฐ์ดํ„ฐ ๋‚ด์˜ ํŒจํ„ด์ด๋‚˜ ๊ตฌ์กฐ๋ฅผ ๋ฐœ๊ฒฌํ•˜๋Š” ๋จธ์‹ ๋Ÿฌ๋‹ ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค.์ด ํ•™์Šต ๋ฐฉ์‹์€ ๋ฐ์ดํ„ฐ์— ์‚ฌ์ „ ์ง€์‹ ์—†์ด ๋ฐ์ดํ„ฐ๋ฅผ ๋ถ„์„ํ•˜๊ณ , ๊ทธ ์•ˆ์— ์ˆจ๊ฒจ์ง„ ์˜๋ฏธ ์žˆ๋Š” ๊ตฌ์กฐ๋‚˜ ๊ด€๊ณ„๋ฅผ ๋ฐœ๊ฒฌํ•˜๋Š” ๋ฐ ์ค‘์ ์„ ๋‘ก๋‹ˆ๋‹ค.Unsupervised Learning (๋น„์ง€๋„ ํ•™์Šต) ์ฃผ์š” ํŠน์ง•๋ ˆ์ด๋ธ” ์—†์Œ: ๋น„์ง€๋„ ํ•™์Šต์€ ๋ ˆ์ด๋ธ”์ด๋‚˜ ๋ชฉํ‘œ ๋ณ€์ˆ˜๊ฐ€ ์—†๋Š” ์ž…๋ ฅ ๋ฐ์ดํ„ฐ๋งŒ์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ์ด๋Š” ๋ ˆ์ด๋ธ”๋ง์ด ์–ด๋ ต๊ฑฐ๋‚˜ ๋ถˆ๊ฐ€๋Šฅํ•œ ๋Œ€๊ทœ๋ชจ ๋ฐ์ดํ„ฐ์…‹์„ ๋‹ค๋ฃฐ ๋•Œ ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค.ํŒจํ„ด ๋ฐœ๊ฒฌ: ๋น„์ง€๋„ ํ•™์Šต์€ ๋ฐ์ดํ„ฐ ๋‚ด์—์„œ ์ˆจ๊ฒจ์ง„ ํŒจํ„ด์ด๋‚˜ ๊ตฌ์กฐ๋ฅผ ํƒ์ƒ‰ํ•˜์—ฌ ๋ฐ์ดํ„ฐ ๊ฐ„์˜ ๊ด€๊ณ„๋ฅผ ์ดํ•ดํ•˜๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ํŒจํ„ด ๋ฐœ๊ฒฌ์€ ๋ฐ์ดํ„ฐ์˜ ๋ณธ์งˆ์ ์ธ ํŠน์„ฑ์„ ์ดํ•ดํ•˜๋Š” ..

๐Ÿ“‡ Machine Learning

[ML] ์‹ ๊ฒฝ๋ง (Neural Network) - ๋‹ค์ธต ํผ์…‰ํŠธ๋ก 

์ด๋ฒˆ์—๋Š” ๋‹ค์ธต ํผ์…‰ํŠธ๋ก (Multilayer Perceptron, MLP)์— ๋ฐํ•˜์—ฌ ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ๋‹ค์ธต ํผ์…‰ํŠธ๋ก (Multilayer Perceptron, MLP)๋‹ค์ธต ํผ์…‰ํŠธ๋ก (Multilayer Perceptron, MLP)์€ ๊ธฐ๋ณธ์ ์ธ ์ธ๊ณต ์‹ ๊ฒฝ๋ง์˜ ํ˜•ํƒœ ์ค‘ ํ•˜๋‚˜๋กœ, ํŠนํžˆ ๋ณต์žกํ•œ ๋น„์„ ํ˜• ๊ด€๊ณ„์™€ ํŒจํ„ด์„ ํ•™์Šตํ•  ์ˆ˜ ์žˆ๋Š” ๋Šฅ๋ ฅ์œผ๋กœ ์ธํ•ด ๋ถ„๋ฅ˜ ๋ฐ ํšŒ๊ท€ ๋ฌธ์ œ์— ๋„๋ฆฌ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ๊ธฐ๋ณธ ๊ตฌ์กฐ๋Š” ์ž…๋ ฅ์ธต, ํ•˜๋‚˜ ์ด์ƒ์˜ ์€๋‹‰์ธต, ๊ทธ๋ฆฌ๊ณ  ์ถœ๋ ฅ์ธต์œผ๋กœ ์ด๋ฃจ์–ด์ง„ FeedForward ์‹ ๊ฒฝ๋ง ์ด๋ฉฐ, ๊ฐ ์ธต์€ ์—ฌ๋Ÿฌ ๋‰ด๋Ÿฐ์œผ๋กœ ๊ตฌ์„ฑ๋ฉ๋‹ˆ๋‹ค.๋˜ํ•œ ๊ฐ ๋‰ด๋Ÿฐ์€ ์ด์ „์ธต์˜ ๋‰ด๋Ÿฐ์œผ๋กœ๋ถ€ํ„ฐ ์ž…๋ ฅ์„ ๋ฐ›์•„ ๊ฐ€์ค‘์น˜๋ฅผ ์ ์šฉํ•˜๊ณ , ํ™œ์„ฑํ™” ํ•จ์ˆ˜๋ฅผ ํ†ตํ•ด ์ถœ๋ ฅ์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.๋‹ค์ธต ํผ์…‰ํŠธ๋ก (Multilayer Perceptron, MLP)์˜ ๊ตฌ์กฐ๋‹ค์ธต ํผ์…‰ํŠธ๋ก ์˜ ๊ตฌ์กฐ๋Š” ..

๐Ÿ“‡ Machine Learning

[ML] Random Forest (๋žœ๋ค ํฌ๋ ˆ์ŠคํŠธ)

์ด๋ฒˆ์—๋Š” Random Forest (๋žœ๋ค ํฌ๋ ˆ์ŠคํŠธ) ๊ธฐ๋ฒ•์— ๋ฐํ•˜์—ฌ ํ•œ๋ฒˆ ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ๋žœ๋ค ํฌ๋ ˆ์ŠคํŠธ(Random Forest)๋Š” ๊ฒฐ์ • ํŠธ๋ฆฌ์˜ ์•™์ƒ๋ธ” ๋ฐฉ๋ฒ• ์ค‘ ํ•˜๋‚˜๋กœ, ์—ฌ๋Ÿฌ ๊ฐœ์˜ ๊ฒฐ์ • ํŠธ๋ฆฌ๋ฅผ ์ƒ์„ฑํ•˜๊ณ  ๊ทธ ์˜ˆ์ธก์„ ๊ฒฐํ•ฉํ•˜์—ฌ ๋”์šฑ ๊ฐ•๋ ฅํ•˜๊ณ  ์•ˆ์ •์ ์ธ ๋ชจ๋ธ์„ ๋งŒ๋“œ๋Š” ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค. ์ด ๋ฐฉ๋ฒ•์€ ํŠนํžˆ ๋ถ„๋ฅ˜์™€ ํšŒ๊ท€ ๋ฌธ์ œ์— ํšจ๊ณผ์ ์ด๋ฉฐ, ๊ฐœ๋ณ„ ๊ฒฐ์ • ํŠธ๋ฆฌ์˜ ๊ณผ์ ํ•ฉ ๋ฌธ์ œ๋ฅผ ๊ทน๋ณตํ•˜๊ณ , ์ „์ฒด์ ์ธ ์˜ˆ์ธก ์„ฑ๋Šฅ์„ ํ–ฅ์ƒ์‹œํ‚ค๋Š” ๋ฐ ๋„์›€์„ ์ค๋‹ˆ๋‹ค. Random Forest (๋žœ๋ค ํฌ๋ ˆ์ŠคํŠธ)์˜ ์ฃผ์š” ํŠน์ง•๋‹ค์–‘์„ฑ (Diversity)๋žœ๋ค ํฌ๋ ˆ์ŠคํŠธ๋Š” ๊ฐ๊ฐ์˜ ๊ฒฐ์ • ํŠธ๋ฆฌ๊ฐ€ ๋ฐ์ดํ„ฐ์˜ ์„œ๋กœ ๋‹ค๋ฅธ ๋ถ€๋ถ„์ง‘ํ•ฉ๊ณผ ํŠน์„ฑ์„ ์‚ฌ์šฉํ•˜์—ฌ ํ•™์Šตํ•ฉ๋‹ˆ๋‹ค. ์ด๋Š” ๊ฐ ํŠธ๋ฆฌ๊ฐ€ ๋…๋ฆฝ์ ์œผ๋กœ ๋‹ค๋ฅธ ํŒจํ„ด์„ ํ•™์Šตํ•˜๋„๋ก ํ•˜์—ฌ ๋ชจ๋ธ ์ „์ฒด์˜ ๋‹ค์–‘์„ฑ์„ ๋†’์ž…๋‹ˆ๋‹ค.์ด๋Ÿฌํ•œ ์ ‘๊ทผ ๋ฐฉ์‹์€ ํŠธ๋ฆฌ ๊ฐ„์˜ ์ƒ๊ด€๊ด€๊ณ„..

๐Ÿ“‡ Machine Learning

[ML] Decision Tree (๊ฒฐ์ • ํŠธ๋ฆฌ)

์ด๋ฒˆ์—๋Š” Decision Tree (๊ฒฐ์ • ํŠธ๋ฆฌ)์— ๋ฐํ•˜์—ฌ ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ๊ฒฐ์ •ํŠธ๋ฆฌ(Decision Tree)๋Š” ๋ถ„๋ฅ˜์™€ ํšŒ๊ท€ ๋ฌธ์ œ์— ๋ชจ๋‘ ์‚ฌ์šฉ๋  ์ˆ˜ ์žˆ๋Š” ์ง€๋„ํ•™์Šต ์•Œ๊ณ ๋ฆฌ์ฆ˜์ž…๋‹ˆ๋‹ค.์ด ๋ชจ๋ธ์€ ๋ฐ์ดํ„ฐ๋ฅผ ํŠธ๋ฆฌ ๊ตฌ์กฐ๋กœ ๋ถ„ํ• ํ•˜์—ฌ ์˜ˆ์ธก์„ ์ˆ˜ํ–‰ํ•˜๋ฉฐ, ๊ฐ ๋‚ด๋ถ€ ๋…ธ๋“œ๋Š” ํŠน์ • ์กฐ๊ฑด์— ๋”ฐ๋ฅธ ๋ฐ์ดํ„ฐ ๋ถ„ํ• ์„ ๋‚˜ํƒ€๋‚ด๊ณ , ๊ฐ€์ง€(branch)๋Š” ๊ทธ ์กฐ๊ฑด์˜ ๊ฒฐ๊ณผ๋ฅผ ๋‚˜ํƒ€๋‚ด๋ฉฐ, ์ตœ์ข… ๋ฆฌํ”„ ๋…ธ๋“œ(leaf node)๋Š” ์˜ˆ์ธก ๊ฐ’์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.Decision Tree์˜ ์ฃผ์š” ํŠน์ง•์ง๊ด€์„ฑ: ๊ฒฐ์ • ํŠธ๋ฆฌ๋Š” ์‹œ๊ฐ์ ์œผ๋กœ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ์–ด ์ดํ•ด๊ฐ€ ์‰ฝ์Šต๋‹ˆ๋‹ค.๋น„๋ชจ์ˆ˜์  ๋ฐฉ๋ฒ•: ๋ฐ์ดํ„ฐ์˜ ๋ถ„ํฌ์— ๋Œ€ํ•ด ํŠน์ • ๊ฐ€์ •์„ ํ•˜์ง€ ์•Š์œผ๋ฏ€๋กœ ๋‹ค์–‘ํ•œ ๋ฐ์ดํ„ฐ์…‹์— ์ ์šฉ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.ํ•ด์„ ์šฉ์ด์„ฑ: ๋ชจ๋ธ์ด ์–ด๋–ป๊ฒŒ ๊ฒฐ์ •์„ ๋‚ด๋ ธ๋Š”์ง€ ์‰ฝ๊ฒŒ ํ•ด์„ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.Decision Tree์˜ ๊ธฐ๋ณธ ์›๋ฆฌ๋…ธ๋“œ์™€..

๐Ÿ“‡ Machine Learning

[ML] Support Vector Machine (SVM, ์„œํฌํŠธ ๋ฒกํ„ฐ ๋จธ์‹ )

์ด๋ฒˆ์—๋Š” Support Vector Machine (์„œํฌํŠธ ๋ฒกํ„ฐ ๋จธ์‹ )์— ๋ฐํ•˜์—ฌ ํ•œ๋ฒˆ ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ์„œํฌํŠธ ๋ฒกํ„ฐ ๋จธ์‹ (Support Vector Machine, SVM)์€ ๋ณต์žกํ•œ ๋ฐ์ดํ„ฐ์…‹์—์„œ๋„ ํšจ๊ณผ์ ์ธ ๋ถ„๋ฅ˜๋ฅผ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ๋Š” ๊ฐ•๋ ฅํ•œ ์ง€๋„ํ•™์Šต ์•Œ๊ณ ๋ฆฌ์ฆ˜์ž…๋‹ˆ๋‹ค. ์ด ์•Œ๊ณ ๋ฆฌ์ฆ˜์€ ๋ฐ์ดํ„ฐ๋ฅผ ๋ถ„๋ฆฌํ•˜๋Š” ์ตœ์ ์˜ ์ดˆํ‰๋ฉด(๊ฒฐ์ • ๊ฒฝ๊ณ„)์„ ์ฐพ์•„๋‚ด๋Š” ๊ฒƒ์„ ๋ชฉํ‘œ๋กœ ํ•ฉ๋‹ˆ๋‹ค.SVM์˜ ์ฃผ์š” ํŠน์ง•๊ณผ ์›๋ฆฌ๋ฅผ ์ž์„ธํžˆ ์‚ดํŽด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. Support Vector Machine (SVM)์˜ ์ฃผ์š” ํŠน์ง•๊ฒฐ์ • ์ดˆํ‰๋ฉด(Decision Hyperplane): ๋‘ ํด๋ž˜์Šค๋ฅผ ๋ถ„๋ฆฌํ•˜๋Š” ๊ฐ€์žฅ ์ข‹์€ ์ดˆํ‰๋ฉด์„ ์ฐพ์Šต๋‹ˆ๋‹ค. ์ด ํ‰๋ฉด์€ ๋‘ ํด๋ž˜์Šค ๊ฐ„์˜ ๋งˆ์ง„(๊ฑฐ๋ฆฌ)์„ ์ตœ๋Œ€ํ™”ํ•ฉ๋‹ˆ๋‹ค.w: ์ดˆํ‰๋ฉด์˜ ๋ฒ•์„  ๋ฒกํ„ฐ, x: ๋ฐ์ดํ„ฐ ํฌ์ธํŠธ, b: ์ ˆํŽธw * x + b = 0์„œํฌํŠธ ๋ฒกํ„ฐ..

๐Ÿ“‡ Machine Learning

[ML] Logistic Regression (๋กœ์ง€์Šคํ‹ฑ ํšŒ๊ท€)

์ด๋ฒˆ์—” Logistic Regression (๋กœ์ง€์Šคํ‹ฑ ํšŒ๊ท€)์— ๋ฐํ•˜์—ฌ ํ•œ๋ฒˆ ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.Logistic Regression (๋กœ์ง€์Šคํ‹ฑ ํšŒ๊ท€)๋กœ์ง€์Šคํ‹ฑ ํšŒ๊ท€(Logistic Regression)๋Š” ์ฃผ๋กœ ์ด์ง„ ๋ถ„๋ฅ˜ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉ๋˜๋Š” ํ†ต๊ณ„์  ๋ชจ๋ธ์ž…๋‹ˆ๋‹ค.์ž…๋ ฅ๋œ ๋…๋ฆฝ ๋ณ€์ˆ˜๋“ค์˜ ์„ ํ˜• ๊ฒฐํ•ฉ์„ ํ†ตํ•ด ์ข…์† ๋ณ€์ˆ˜(์ด์ง„ ๋ณ€์ˆ˜)์˜ ๋ฐœ์ƒ ํ™•๋ฅ ์„ ์˜ˆ์ธกํ•ฉ๋‹ˆ๋‹ค.๋กœ์ง€์Šคํ‹ฑ ํšŒ๊ท€์˜ ์ฃผ์š” ํŠน์ง• ๋ถ„๋ฅ˜ ์•Œ๊ณ ๋ฆฌ์ฆ˜: ์ด์ง„ ๋ถ„๋ฅ˜ ๋ฌธ์ œ๋ฅผ ์ฃผ๋กœ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ๋‹ค์ค‘ ํด๋ž˜์Šค ๋ถ„๋ฅ˜ ๋ฌธ์ œ์—์„œ๋„ ํ™•์žฅํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.ํ™•๋ฅ  ์ถœ๋ ฅ: ์˜ˆ์ธก ๊ฒฐ๊ณผ๋ฅผ 0๊ณผ 1 ์‚ฌ์ด์˜ ํ™•๋ฅ  ๊ฐ’์œผ๋กœ ์ถœ๋ ฅํ•ฉ๋‹ˆ๋‹ค.์„ ํ˜• ํšŒ๊ท€์™€์˜ ์ฐจ์ด์ : ์„ ํ˜• ํšŒ๊ท€๋Š” ์—ฐ์†์ ์ธ ๊ฐ’์„ ์˜ˆ์ธกํ•˜์ง€๋งŒ, ๋กœ์ง€์Šคํ‹ฑ ํšŒ๊ท€๋Š” ์ด์ง„ ๊ฐ’์„ ์˜ˆ์ธกํ•ฉ๋‹ˆ๋‹ค.๋กœ์ง€์Šคํ‹ฑ ํšŒ๊ท€์˜ ๊ธฐ๋ณธ ์›๋ฆฌ๊ทธ๋Ÿฌ๋ฉด, Logistic Regre..

๐Ÿ“‡ Machine Learning

[ML] K-Nearest Neighbors, K-NN (K-์ตœ๊ทผ์ ‘ ์ด์›ƒ)

์ด๋ฒˆ์—”๋Š” K-NN์— ๋ฐํ•˜์—ฌ ํ•œ๋ฒˆ ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.K-NN ์ด๋ž€?K-NN(์ตœ๊ทผ์ ‘ ์ด์›ƒ ์•Œ๊ณ ๋ฆฌ์ฆ˜)์€ ๋ฐ์ดํ„ฐ ๋ถ„๋ฅ˜ ๋ฐ ํšŒ๊ท€ ๋ฌธ์ œ์—์„œ ๋„๋ฆฌ ์‚ฌ์šฉ๋˜๋Š” ๋น„๋ชจ์ˆ˜์  ๊ธฐ๊ณ„ ํ•™์Šต ์•Œ๊ณ ๋ฆฌ์ฆ˜์ž…๋‹ˆ๋‹ค.์ž…๋ ฅ ๋ฐ์ดํ„ฐ ํฌ์ธํŠธ์˜ ํด๋ž˜์Šค๋ฅผ ์˜ˆ์ธกํ•˜๊ธฐ ์œ„ํ•ด ๊ทธ ๋ฐ์ดํ„ฐ ํฌ์ธํŠธ์™€ ๊ฐ€์žฅ ๊ฐ€๊นŒ์šด K๊ฐœ์˜ ์ด์›ƒ์„ ๊ธฐ๋ฐ˜์œผ๋กœ ๊ฒฐ์ •์„ ๋‚ด๋ฆฌ๋Š” ์•Œ๊ณ ๋ฆฌ์ฆ˜์ž…๋‹ˆ๋‹ค.K-NN์€ ๋ถ„๋ฅ˜(Classification)์™€ ํšŒ๊ท€(Regression) ๋ฌธ์ œ ๋ชจ๋‘์— ์‚ฌ์šฉ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.K-NN์˜ ์ฃผ์š” ํŠน์ง•1. ๋น„๋ชจ์ˆ˜์  ๋ฐฉ๋ฒ•K-NN์€ ๋ฐ์ดํ„ฐ ๋ถ„ํฌ์— ๋Œ€ํ•ด ํŠน์ •ํ•œ ๊ฐ€์ •์„ ํ•˜์ง€ ์•Š๋Š” ๋น„๋ชจ์ˆ˜์ (non-parametric) ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค. ์ด๋Š” ๋ฐ์ดํ„ฐ์˜ ํ˜•ํƒœ๋‚˜ ๋ถ„ํฌ์— ๋Œ€ํ•ด ์‚ฌ์ „ ์ง€์‹์ด ์—†์–ด๋„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒƒ์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค.2. ๋ฉ”๋ชจ๋ฆฌ ๊ธฐ๋ฐ˜๋ชจ๋ธ์„ ํ•™์Šตํ•˜๋Š” ๊ณผ์ •์ด ์—†๊ณ , ์˜ˆ์ธก ์‹œ์— ๋ชจ๋“  ํ•™์Šต ๋ฐ์ดํ„ฐ..

๐Ÿ•น๏ธ ํ˜ผ๊ณต๋จธ์‹ 

[ํ˜ผ๊ณต๋จธ์‹ ] Clustering Algoritm (๊ตฐ์ง‘ ์•Œ๊ณ ๋ฆฌ์ฆ˜)

Target์„ ๋ชจ๋ฅด๋Š” Unsupervised Learning(๋น„์ง€๋„ ํ•™์Šต)Target์„ ๋ชจ๋กœ๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์ข…๋ฅ˜๋ณ„๋กœ ๋ถ„๋ฅ˜ํ•˜๋ ค๊ณ  ํ• ๋•Œ ์‚ฌ์šฉํ•˜๋Š” ML ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด ์žˆ์Šต๋‹ˆ๋‹ค.๋ฐ”๋กœ Unsuperivsed Learning (๋น„์ง€๋„ ํ•™์Šต) ์ž…๋‹ˆ๋‹ค. ์‚ฌ๋žŒ์ด ์•Œ๋ ค์ฃผ์ง€ ์•Š์•„๋„, ๋ฐ์ดํ„ฐ์— ์žˆ๋Š” ๋ฌด์–ธ๊ฐ€๋ฅผ ํ•™์Šตํ•˜๋Š” ๋ฐฉ์‹์ด๋ผ๊ณ  ์ƒ๊ฐํ•˜์‹œ๋ฉด ํŽธํ•ฉ๋‹ˆ๋‹ค.๊ทธ๋Ÿฌ๋ฉด ํ•œ๋ฒˆ ๋ฐ์ดํ„ฐ๋ฅผ ์ค€๋น„ํ•ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.Data ์ค€๋น„ํ•˜๊ธฐ์‚ฌ๊ณผ, ๋ฐ”๋‚˜๋‚˜, ํŒŒ์ธ์• ํ”Œ๋กœ ๊ตฌ์„ฑ๋œ ํ‘์ƒ‰ ์‚ฌ์ง„์˜ ๊ณผ์ผ ๋ฐ์ดํ„ฐ๋ฅผ ์ค€๋น„ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.!wget https://bit.ly/fruits_300_data -O fruits_300.npy--2023-07-16 14:21:20-- https://bit.ly/fruits_300_dataResolving bit.ly (bit.ly)... 67.199...

Bigbread1129
My Dev & Research Repository