728x90
๋ฐ˜์‘ํ˜•

Computer Science 99

[swift] GeometryReader

GeometryReader https://developer.apple.com/documentation/swiftui/geometryreader GeometryReader๋Š” SwiftUI ์—์„œ View๊ฐ€ ํฌํ•จ๋œ ๋ถ€๋ชจ๋ทฐ(์ปจํ…Œ์ด๋„ˆ)์˜ ํฌ๊ธฐ๋ฅผ ๊ธฐ์ค€์œผ๋กœ View์˜ frame ์กฐ์ ˆํ•˜๋Š” ๋ฐฉ๋ฒ•

[swift] xcode๊ฐ€ ๋‚ด ๊ธฐ๊ธฐ๋ฅผ ๋ชป ์ฐพ์„ ๋•Œ

Even though this one does not address the specific problem of the OP, it might be a solution for other people finding this question. In some circumstances, Xcode will not recognise (won't even see) a connected device that was previously recognised, even though there were no changes in Mac OS/iOS/Xcode versions. This seems to happen if you connect the device while the Mac and/or the device are lo..

[Xcode] Preview crashed ํ˜„์ƒ

๋‚˜๋Š” swift ์ž…๋ฌธ์ž๋‹ค swfit์–ธ์–ด๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋ฉด ๋ฐ˜๋“œ์‹œ xcode์—์„œ ์จ์•ผํ•œ๋‹ค (๋‹ค๋“ค ์•Œ์ฃ ?) ์ด๋Ÿฐ ์ž…๋ฌธ์ž์—๊ฒŒ preview๊ฐ€ ์ž๊พธ ์‹œ๋ จ์„ ์ค€๋‹ค ๋‚จ๋“ค์ด ํ•˜๋Š”๊ฑฐ ๋ณด๋‹ˆ๊นŒ preview๋ฅผ ํ†ตํ•ด์„œ dynamicํ•˜๊ฒŒ ์ฝ”๋”ฉํ•˜๊ณ  uiํ™•์ธํ•˜๋˜๋ฐ ๋‚˜๋Š” ๋ญ ํ™”๋ฉด ํด๋ฆญ๋งŒ ํ•˜๋ฉด ์ž๊พธ preview crashed ํ•˜๋ฉด์„œ ๋นจ๊ฐ„ ์—‘์Šค๊ฐ€ ๋œฌ๋‹ค ใ… ใ… ใ…  ๊ฒฐ๊ตญ ์—๋Ÿฌ๋ฅผ ๊ณ ์ณ๋ณด๊ธฐ๋กœ..! preview์ฐฝ ์ƒ๋‹จ์— ๋ณด๋ฉด preview crashed์— ๋Œ€ํ•œ ์„ค๋ช…์„ ํ•ด์ค€๋‹ค. ํ•„์ž์˜ ๊ฒฝ์šฐ๋Š” ์•„๋ž˜์™€ ๊ฐ™์ด ๋–ด๋‹ค ์ผ๋‹จ ํ•ด๊ฒฐ์„ ํ•˜๊ณ  ์‹ถ์—ˆ๊ธฐ ๋–„๋ฌธ์— Diagnostics๋ฅผ ํด๋ฆญํ•ด๋ดค๋‹ค HumanReadableNSError: Unable to boot device due to insufficient system resources. Please see Simula..

Computer Science 2021.06.04

[Machine Learning] LightGBM์ด๋ž€? โœ” ์„ค๋ช… ๋ฐ ์žฅ๋‹จ์ 

๐Ÿ“Œ Remind LightGBM์— ๋“ค์–ด๊ฐ€๊ธฐ์ „์— ๋ณต์Šต ๊ฒธ reminding์„ ํ•ด๋ณด์ž. Light GBM์˜ GBM์€ Gradient Boosting Model๋กœ, tree๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ํ•˜๋Š” ํ•™์Šต ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด๋‹ค. ์ด GBM์˜ ํ•™์Šต๋ฐฉ์‹์„ ์‰ฝ๊ฒŒ๋งํ•˜๋ฉด, ํ‹€๋ฆฐ๋ถ€๋ถ„์— ๊ฐ€์ค‘์น˜๋ฅผ ๋”ํ•˜๋ฉด์„œ ์ง„ํ–‰ํ•œ๋‹ค๊ณ  ํ•  ์ˆ˜ ์žˆ๋‹ค. Gradient Boosting์—์„œ Boosting์€ ์—ฌ๋Ÿฌ๊ฐœ์˜ tree๋ฅผ ๋งŒ๋“ค๋˜, ๊ธฐ์กด์— ์žˆ๋Š” ๋ชจ๋ธ(tree)๋ฅผ ์กฐ๊ธˆ์”ฉ ๋ฐœ์ „์‹œ์ผœ์„œ ๋งˆ์ง€๋ง‰์— ์ด๋ฅผ ํ•ฉํ•˜๋Š” ๊ฐœ๋…์œผ๋กœ, Random Forest์˜ Bagging๊ธฐ๋ฒ•๊ณผ ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์ด๋‹ค. Boostingํ•˜๋Š” ๋ฐฉ์‹์—๋„ ํฌ๊ฒŒ 2๊ฐ€์ง€๊ฐ€ ์žˆ๋‹ค. 1. AdaBoost์™€ ๊ฐ™์ด ์ค‘์š”ํ•œ ๋ฐ์ดํ„ฐ(์ผ๋ฐ˜์ ์œผ๋กœ ๋ชจ๋ธ์ด ํ‹€๋ฆฐ ๋ฐ์ดํ„ฐ)์— ๋Œ€ํ•ด weight๋ฅผ ์ฃผ๋Š” ๋ฐฉ์‹ 2. GBDT์™€ ๊ฐ™์ด loss fun..

[Machine Learning] ๋จธ์‹ ๋Ÿฌ๋‹, ๋ชจ๋ธ์˜ ํŽธํ–ฅ(bias)๊ณผ ๋ถ„์‚ฐ(variance) : trade-off ๊ด€๊ณ„

๋จธ์‹ ๋Ÿฌ๋‹์—์„œ ํŽธํ–ฅ๊ณผ ๋ถ„์‚ฐ์€ ์–ธ์ œ ์“ฐ์ด๋Š” ์šฉ์–ด์ธ๊ฐ€? Supervised Learning(์ง€๋„ํ•™์Šต)์— ๋Œ€ํ•ด์„œ ๊ฐ„๋‹จํžˆ ์„ค๋ช…ํ•ด๋ณด์ž๋ฉด ์‚ฌ๋žŒ์ด ์ •ํ•ด์ค€ ์ •๋‹ต์ด ์žˆ๊ณ , ์šฐ๋ฆฌ์˜ ๋ชจ๋ธ์€ ๊ทธ ์ •๋‹ต์„ ์ž˜ ๋งž์ถ”๋Š” ๋ฐฉํ–ฅ์œผ๋กœ ํ•™์Šต(training)์„ ํ•œ๋‹ค. ์ด๋•Œ, ํ•™์Šต์„ ํ•˜๋ฉด์„œ ๋ชจ๋ธ์ด ๋‚ด๋†“๋Š” ์˜ˆ์ธก๊ฐ’๋“ค์˜ ๊ฒฝํ–ฅ์„ ํ‘œํ˜„ํ•˜๊ธฐ์œ„ํ•ด ํŽธํ–ฅ๊ณผ ๋ถ„์‚ฐ์ด๋ผ๋Š” ์šฉ์–ด๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค. ์‰ฝ๊ฒŒ ๋งํ•˜์ž๋ฉด, ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค A. ์˜ˆ์ธก๊ฐ’๊ณผ ์ •๋‹ต ๊ฐ„์˜ ๊ด€๊ณ„๋ฅผ "ํŽธํ–ฅ"์œผ๋กœ ํ‘œํ˜„ (bias : model์˜ output๊ณผ ์‹ค์ œ๊ฐ’ ์‚ฌ์ด์˜ ์ œ๊ณฑ error, ์ •ํ™•๋„์™€ ๋น„์Šทํ•œ ๊ฐœ๋…) B. ์˜ˆ์ธก๊ฐ’๋ผ๋ฆฌ์˜ ๊ด€๊ณ„๋ฅผ "๋ถ„์‚ฐ"์œผ๋กœ ํ‘œํ˜„ (variance : model์ด ๊ฐ๊ธฐ ๋‹ค๋ฅธ train set์— ๋Œ€ํ•˜์—ฌ ์„ฑ๋Šฅ์˜ ๋ณ€ํ™”์ •๋„๊ฐ€ ๊ธ‰ํ•˜๊ฒŒ ๋ณ€ํ•˜๋Š”์ง€, ์•ˆ์ •์ ์œผ๋กœ ๋ณ€ํ•˜๋Š”์ง€๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” ์ฒ™๋„) [๋”ฅ๋Ÿฌ๋‹] Bia..

[๊ฐœ๋ฐœ์šฉ์–ด] pilot ์ด๋ž€?

Pilot ์›์‹œ ํ”„๋กœ๊ทธ๋žจ์ด๋‚˜ ์‹œํ—˜ ํ”„๋กœ๊ทธ๋žจ ๋“ฑ์„ ์‹œํ—˜ํ•˜๋Š” ์ผ ์ฆ‰, ํ”„๋กœ๊ทธ๋žจ์„ ์‹ค์ œ๋กœ ์šด์šฉํ•˜๊ธฐ ์ „์— ์˜ค๋ฅ˜, ๋˜๋Š” ๋ถ€์กฑํ•œ ์ ์„ ์ฐพ๊ธฐ ์œ„ํ•˜์—ฌ ์‹ค์ œ ์ƒํ™ฉ๊ณผ ์œ ์‚ฌํ•œ ์กฐ๊ฑด์—์„œ ์‹œํ—˜๊ฐ€๋™ํ•˜๋Š” ํ–‰์œ„ ๊ทธ๋ ‡๊ธฐ์— ์ƒˆ๋กœ์šด ์„œ๋น„์Šค ์ถœ์‹œ ์ „์— ๋งŽ์ด ์‚ฌ์šฉ๋จ ๋น„์Šทํ•˜๊ฒŒ ์‹œ๋ฒ”ํ…Œ์ŠคํŠธ ํ†ตํ•ฉํ…Œ์ŠคํŠธ ๋‹จ๊ณ„์˜ SW ๊ฒฐํ•จ์ธก์ •ํ…Œ์ŠคํŠธ ํ’ˆ์งˆ ๊ฒ€์ฆ ๋ผ๊ณ  ๋ณผ ์ˆ˜ ์žˆ๋‹ค reference : m.blog.naver.com/PostView.nhn?blogId=musalyh&logNo=220990847736&proxyReferer=https:%2F%2Fwww.google.com%2F

๋ฌธ์„œ์œ ์‚ฌ๋„

๋ฌธ์„œ์œ ์‚ฌ๋„ 0. Base ์˜ˆ๋ฅผ ๋“ค์–ด ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋ฌธ์„œ๊ฐ€ ์žˆ๊ณ , ๋ฌธ์„œ๋ฅผ feature space์— ๋†“๋Š”๋‹ค๊ณ  ์ƒ๊ฐํ•ด๋ณด์ž ๊ฐ•์•„์ง€ ๊ท€์—ฝ๋‹ค ๋งค์šฐ ๊ฐ•์•„์ง€๊ฐ€ ๊ท€์—ฝ๋‹ค 1 1 0 ๊ฐ•์•„์ง€๊ฐ€ ๋งค์šฐ ๊ท€์—ฝ๋‹ค 1 1 1 ๊ณ ์–‘์ด๊ฐ€ ๋งค์šฐ ๊ท€์—ฝ๋‹ค 0 1 1 ๊ฐ ๋‹จ์–ด ‘๊ฐ•์•„์ง€’, ‘๊ณ ์–‘์ด’, ‘๋งค์šฐ’๋ฅผ ์ถ•์œผ๋กœ ํ•˜๋Š” ํŠน์„ฑ๊ณต๊ฐ„(feature space)์—์„œ ๋‹ค์Œ ๋ฌธ์„œ๋“ค์„ ํ•˜๋‚˜์˜ ์ขŒํ‘œ๋กœ ์ƒ๊ฐํ•  ์ˆ˜ ์žˆ์Œ ‘๊ฐ•์•„์ง€๊ฐ€ ๊ท€์—ฝ๋‹ค’ --> (1,1,0) ‘๊ฐ•์•„์ง€๊ฐ€ ๋งค์šฐ ๊ท€์—ฝ๋‹ค’ --> (1,1,1) ‘๊ณ ์–‘์ด๊ฐ€ ๋งค์šฐ ๊ท€์—ฝ๋‹ค’ --> (0,1,1) ๋‘ ๋‹จ์–ด ํ˜น์€ ๋ฌธ์žฅ์ด ์ฃผ์–ด์กŒ์„ ๋•Œ, ์œ ์‚ฌ๋„๋ฅผ ์ธก์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ์—ฌ๋Ÿฌ๊ฐ€์ง€๊ฐ€ ์žˆ๋‹ค cosine similarity jaccard similarity euclidean distance manhattan distance..

[Window10 ๋‹จ์ถ•ํ‚ค] ์œˆ๋„์šฐ10 ์œ ์šฉํ•œ ๋‹จ์ถ•ํ‚ค ๐Ÿ•น

[๊ฐ€์ƒ ๋ฐ์Šคํฌํ†ฑ]Win + Tab : ์œˆ๋„ 10์˜ ํ…Œ์Šคํฌ ๋ฐ”(Task bar)๋ฅผ ์—ฝ๋‹ˆ๋‹ค.Win + Ctrl + D : ๊ฐ€์ƒ ๋ฐ์Šคํฌํ†ฑ(Virture Desktop)์„ ํ•˜๋‚˜ ๋งŒ๋“ญ๋‹ˆ๋‹ค.Win + Ctrl + F4 : ํ˜„์žฌ์˜ ๊ฐ€์ƒ ๋ฐ์Šคํฌํ†ฑ์„ ๋‹ซ์Šต๋‹ˆ๋‹ค.Win + Ctrl + ์ขŒ์šฐ ๋ฐฉํ–ฅํ‚ค : ๋‹ค๋ฅธ ๊ฐ€์ƒ ๋ฐ์Šคํฌํ†ฑ ํ™”๋ฉด์œผ๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค. [๋“€์–ผ๋ชจ๋‹ˆํ„ฐ]Win + P : ํ”„๋กœ์ ํŠธ, ๋“€์–ผ๋ชจ๋‹ˆํ„ฐ ์„ค์ •์ฐฝWin + Shift + ์ขŒ/์šฐ ๋ฐฉํ–ฅํ‚ค : ํ˜„์žฌ ์ฐฝ์„ ํ™•์žฅ๋œ ํ™”๋ฉด์œผ๋กœ ์ด๋™์‹œํ‚ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ”„๋กœ์ ํ„ฐ๋‚˜ ๋“€์–ผ ๋ชจ๋‹ˆํ„ฐ ๊ตฌ์„ฑ์œผ๋กœ ํ™”๋ฉด์„ ํ™•์žฅํ–ˆ์„ ๋•Œ ์‚ฌ์šฉํ•˜๋ฉด ์ข‹์Šต๋‹ˆ๋‹ค. [์œˆ๋„์šฐ Sanp, ์ž‘์—…์ „ํ™˜]Win + ์ขŒ/์šฐ ๋ฐฉํ–ฅํ‚ค : ์‚ฌ์šฉ์ค‘์ธ ์ฐฝ์„ ์ขŒ์šฐ๋กœ ์ด๋™ ์‹œํ‚ต๋‹ˆ๋‹ค.Win + Tab : ์œˆ๋„์šฐ ์ž‘์—…๋ณด๊ธฐ๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค. (์—ด๋ ค์žˆ๋Š” ๋ชจ๋“  ์ฐฝ์„ ..

[python list] ํŒŒ์ด์ฌ ๋ฆฌ์ŠคํŠธ ์•ˆ ๋ฆฌ์ŠคํŠธ ํŽผ์น˜๊ธฐ_how to flatten a list of lists in python

#ํŒŒ์ด์ฌ ๋ฆฌ์ŠคํŠธ ํŽผ์น˜๊ธฐ #ํŒŒ์ด์ฌ 2d ๋ฆฌ์ŠคํŠธ ํŽผ์น˜๊ธฐ #python 2d list flatten #python nested list flatten ๋‹ค์Œ๊ณผ ๊ฐ™์ด 2D list๋ฅผ 1D list๋กœ ์ „ํ™˜ํ•˜๋Š” ๋ฐฉ์‹์„ 'flattening'์ด๋ผ๊ณ  ํ•œ๋‹ค 1. itertools์˜ chain ํ•จ์ˆ˜ ์‚ฌ์šฉํ•˜๊ธฐ import itertools List_2D = [['a','b','c'],[1,2,3],['d',4,'e']] #List to be flattened List_flat = list(itertools.chain(*List_2D)) print("Original List:",List_2D) print("Flattened List:",List_flat) # print๋ฌธ ์ถœ๋ ฅ๊ฒฐ๊ณผ # Original List: [['a', 'b..

Computer Science 2021.04.22

[Git ํด๋” ์ƒ์„ฑ] github์—์„œ ํด๋” ์ƒ์„ฑํ•˜๋Š” ๋ฐฉ๋ฒ•

git web browser interface๋ฅผ ํ†ตํ•ด repository์•ˆ์— ์ƒˆ๋กœ์šด ํด๋”๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๋ฐฉ๋ฒ• 1. ์šฐ์ธก ์ƒ๋‹จ์— Add file ํด๋ฆญ > Create new file ํด๋ฆญ 2. '/' ๊ตฌ๋ถ„์ž๋ฅผ ์ด์šฉํ•ด ํด๋”์ด๋ฆ„, ํŒŒ์ผ์ด๋ฆ„ type โ—โ— ์ค‘์š”ํ•œ ์  github์—์„œ๋Š” ๋นˆ ํด๋”๋ฅผ ์ƒ์„ฑํ•  ์ˆ˜ ์—†๋‹ค (cannot create empty folder) ๊ทธ๋ ‡๊ธฐ ๋•Œ๋ฌธ์— ํด๋”์ด๋ฆ„์„ ์น˜๊ณ  '/' ๊ตฌ๋ถ„์ž๋ฅผ ์ณ์ค€ ํ›„, ์ƒ์„ฑํ•  ํŒŒ์ผ ์ด๋ฆ„๊นŒ์ง€ ์ณ์ค˜์•ผ ํ•œ๋‹ค (์ƒ์„ฑํ•  ํŒŒ์ผ ์—†์œผ์‹œ๋ฉด ๊ทธ๋ƒฅ readme.md ๋ฅผ ์น˜์„ธ์š”) 3. ์•„๋ž˜ commit new file ํด๋ฆญ commit new file ๊นŒ์ง€ ํด๋ฆญํ•ด์•ผ ํด๋” ์ƒ์„ฑ์ด ์™„๋ฃŒ๋œ๋‹ค!!

Computer Science 2021.04.20

[์ •๋ณด์ฒ˜๋ฆฌ๊ธฐ์‚ฌ] ํ•„๊ธฐ ๊ด€๋ จ ์ž๋ฃŒ(์š”์•ฝ๋ณธ, ๊ธฐ์ถœ)์™€ ์‹œํ—˜ ํ›„๊ธฐ

"์ •๋ณด์ฒ˜๋ฆฌ๊ธฐ์‚ฌ" ์‹œํ—˜์— ๋Œ€ํ•œ ๋น ๋ฅธ ์ •๋ณด ๋‚˜์—ด! ์ž๊ฒฉ ์ข…๋ชฉ : ์ •๋ณด์ฒ˜๋ฆฌ๊ธฐ์‚ฌ ํ•„๊ธฐ (ํ•„๊ธฐ ์‹œํ—˜์„ ํ†ต๊ณผํ•ด์•ผ ์ •๋ณด์ฒ˜๋ฆฌ๊ธฐ์‚ฌ ์‹ค๊ธฐ ์‹œํ—˜์„ ๋ณด์‹ค ์ˆ˜ ์žˆ์–ด์š”!) ์‹œํ—˜ ์ ‘์ˆ˜ : http://www.q-net.or.kr ์‚ฌ์ดํŠธ๋ฅผ ํ†ตํ•ด ์‹ ์ฒญ ์‘์‹œ๋ฃŒ : 19400์› ์‹œํ—˜ ์น˜๋ฅธ ๋‚ ์งœ : 2019๋…„ 4์›” 27์ผ (ํ† ) ์‹œํ—˜ ์žฅ์†Œ : ์šฉ์‚ฐ๊ณต์—…๊ณ ๋“ฑํ•™๊ต (์„ ํƒ) ๊ณผ๋ชฉ : ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์ „์ž๊ณ„์‚ฐ๊ธฐ๊ตฌ์กฐ ์šด์˜์ฒด์ œ ์†Œํ”„ํŠธ์›จ์–ด๊ณตํ•™ ๋ฐ์ดํ„ฐํ†ต์‹  ๋ฌธ์ œ์ˆ˜ : 100๋ฌธ์ œ (๊ณผ๋ชฉ ๋‹น 20๋ฌธ์ œ) ํ•ฉ๊ฒฉ ๊ธฐ์ค€ : ํ‰๊ท  60์  ์ด์ƒ, ๊ณผ๋ฝ ๊ธฐ์ค€ : ๊ฐ ๊ณผ๋ชฉ 40์  ๋ฏธ๋งŒ ์ง์ ‘ ๊ณต๋ถ€ ํ›„ ์‹œํ—˜ ์นœ ํ›„๊ธฐ..! *์ €๋Š” 4๋…„์ œ ๋Œ€ํ•™๊ต ์ปด๊ณต๊ณผ์— ์žฌํ•™ ์ค‘์ž…๋‹ˆ๋‹ค* ์ผ๋‹จ ์ €๋Š” ์˜ฌํ•ด ์•ˆ์œผ๋กœ ์ •๋ณด์ฒ˜๋ฆฌ๊ธฐ์‚ฌ ์ž๊ฒฉ์ฆ์„ ๋”ฐ๋Š” ๊ฒƒ์ด ๋ชฉํ‘œ์˜€์–ด์š”! ์ฒ˜์Œ์— ์ž˜ ๋ชฐ๋ž์—ˆ์„ ๋•Œ ์ž์ฃผ ์žˆ๋Š” ์‹œํ—˜์ธ ์ค„ ์•Œ..

Naive Bayes Classifier

๊ฐœ์š” ๋‹จ์ˆœ๊ทœ์น™๋ชจํ˜•: ์˜ˆ์ธก๋ณ€์ˆ˜๊ฐ€ ํ•„์š” ์—†๋Š” ๋ชจํ˜•, ์ฃผ๋กœ ๊ณ ๊ธ‰ ๋ชจํ˜•๋“ค๊ณผ ๋น„๊ตํ•˜๊ธฐ ์œ„ํ•œ baseline ๋‹จ์ˆœ ๋ฒ ์ด์ฆˆ ๋ถ„๋ฅ˜๋ชจํ˜• => ์ด ๊ธฐ๋ฒ•๋“ค์€ ๋ฐ์ดํ„ฐ ๊ตฌ์กฐ์— ๋Œ€ํ•œ ๊ฐ€์ •์„ ๊ฑฐ์˜ ํ•˜์ง€ ์•Š๋Š”๋‹ค๋Š” ๊ณตํ†ต์ ! (data-driven) (makes no assumption about the data) ๋‹จ์ˆœ๊ทœ์น™ ๋ชจ๋“  ์˜ˆ์ธก๋ณ€์ˆ˜๋ฅผ ๋ถ„๋ฅ˜ํ•œ ์ƒ์ฑ„์—์„œ ์–ด๋Š ํ•œ record๋ฅผ m๊ฐœ์˜ ์ง‘๋‹จ ์ค‘์— ์ œ์ผ ๋งŽ์€ ํ•˜๋‚˜(prevalent class)๋กœ ๋ถ„๋ฅ˜ํ•˜๋Š” ๋‹จ์ˆœํ•œ ๊ทœ์น™ ๋‹จ์ˆœ ๋ฒ ์ด์ฆˆ ๋ถ„๋ฅ˜๋ชจํ˜• ๋‹จ์ˆœ๊ทœ์น™๋ณด๋‹ค ์ •๊ตํ•œ ๋ฐฉ๋ฒ• : ๋‹จ์ˆœ๊ทœ์น™ + ์˜ˆ์ธก๋ณ€์ˆ˜ ์ •๋ณด ๋‹ค๋ฅธ ๋ถ„๋ฅ˜๋ชจํ˜•๊ณผ ๋‹ฌ๋ฆฌ naive bayes classifier๋Š” ์˜ˆ์ธก๋ณ€์ˆ˜๊ฐ€ ๋ฒ”์ฃผํ˜•์ธ ๊ฒฝ์šฐ์—๋งŒ ์ ์šฉ๋จ ๋”ฐ๋ผ์„œ ์ˆ˜์น˜ํ˜• ์˜ˆ์ธก๋ณ€์ˆ˜๋Š” ๋ฒ”์ฃผํ˜• ์˜ˆ์ธก๋ณ€์ˆ˜๋กœ ๋ณ€ํ™˜ํ•˜์—ฌ์•ผ ํ•จ ๋‹จ์ˆœ ๋ฒ ์ด์ฆˆ ๊ธฐ๋ฒ•์€ ๋ฐ์ดํ„ฐ ์ง‘ํ•ฉ์ด ๋งค์šฐ ํด..

Decision Tree ๊ฐ„.๋‹จ.๋ช….๋ฃŒ

Decision tree : ์˜์‚ฌ๊ฒฐ์ •๋‚˜๋ฌด ๋ถ„๋ฅ˜(classification)๊ณผ ํšŒ๊ท€๋ถ„์„(regression)์— ๋ชจ๋‘ ์‚ฌ์šฉ๋  ์ˆ˜ ์žˆ๊ธฐ ๋–„๋ฌธ์— CART(Classification And Regression Tree)๋ผ๊ณ  ๋ถˆ๋ฆผ node tree์˜ node : ์งˆ๋ฌธ/๋‹ต์„ ๋‹ด๊ณ  ์žˆ์Œ root node : ์ตœ์ƒ์œ„ node ์ตœ์ƒ์œ„ node์˜ ์†์„ฑ feature๊ฐ€ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ํŠน์„ฑ leaf node : ๋งˆ์ง€๋ง‰ node (๋ง๋‹จ๋…ธ๋“œ) ๋งŒ์•ฝ tree์˜ ๋ชจ๋“  leaf node๊ฐ€ pure node๊ฐ€ ๋  ๋•Œ๊นŒ์ง€ ์ง„ํ–‰ํ•˜๋ฉด model์˜ ๋ณต์žก๋„๋Š” ๋งค์šฐ ๋†’์•„์ง€๊ณ  overfitting๋จ overfitting ๋ฐฉ์ง€ tree์˜ ์ƒ์„ฑ์„ ์‚ฌ์ „์— ์ค‘์ง€ : pre-prunning (=๊นŠ์ด์˜ ์ตœ๋Œ€๋ฅผ ์„ค์ •, max_depth) ๋ฐ์ดํ„ฐ๊ฐ€ ์ ์€ node ์‚ญ..

728x90
๋ฐ˜์‘ํ˜•