๐Ÿ Python

[Python]Machine Learning2:Naive Bayes classifier, Logistic Regression

๋‰ด์ด NUEY 2024. 6. 20. 18:49
๋ฐ˜์‘ํ˜•

 

Text Mining

  • ๋ฌธ์„œ ํ•ด์„ ์˜ˆ์‹œ๋ฅผ ๋“ค์–ด
  • ์œ„ ๊ทธ๋ž˜ํ”„์˜ 'Pythons are constrictors that feed on birds and mammals'๋ฅผ ํ•ด์„ ํ•  ๋•Œ

  • 'Pythons', 'are', 'constrictors', 'that', 'feed', 'on', 'birds', 'and', 'mammals' ๋กœ ์ชผ๊ฐค ์ˆ˜ ์žˆ๋‹ค.
  • ์ด ๋‹จ์–ด๋“ค ์ค‘ ์ค‘์š”ํ•œ ๋‹จ์–ด๋งŒ ์ฐพ๊ธฐ ์œ„ํ•ด ์ž์—ฐ์–ด์ฒ˜๋ฆฌ(=์ƒ‰์ธ์–ด ์ถ”์ถœ)์„ ํ•ด์•ผํ•œ๋‹ค.
  • and์™€ ๊ฐ™์ด ํ•„์š”์—†๋Š” ๋ถˆ์šฉ์–ด๋“ค์„ ๋ฐ์ดํ„ฐ์—์„œ ๋นผ์•ผํ•œ๋‹ค.

Naive Bayes classifier
→ ์ •ํ™•ํ•œ ๋ถ„๋ฅ˜ ๋Œ€์‹  ํ™•๋ฅ ์„ ์ด์šฉํ•œ ์•Œ๊ณ ๋ฆฌ์ฆ˜.

  • ์œ„ ํ…์ŠคํŠธ ๋งˆ์ด๋‹ํ•œ ๋ฐ์ดํ„ฐ๋กœ ๋ ˆ์ด๋ธ”์ด Language์ผ ํ™•๋ฅ ๊ณผ snake์ผ ํ™•๋ฅ ์„ ๊ณฑํ•œ๋‹ค.

๋ฐ•์Šค์— ์†์„ ๋„ฃ์—ˆ์„ ๋•Œ gray๊ณต๊ณผ black๊ณต์„ ์žก์„ ํ™•๋ฅ ์„ ๊ตฌํ•ด๋ณด๋ฉด ์œ„์™€ ๊ฐ™๋‹ค.
์•Œ๊ณ ๋ฆฌ์ฆ˜ ํ˜•ํƒœ.

๊ณฑํ•ด์ค„ ๊ฒฝ์šฐ ํ•˜๋‚˜๋ผ๋„ 0์ด๋ฉด ๊ฒฐ๊ณผ๊ฐ€ 0์ด๊ธฐ ๋•Œ๋ฌธ์—
ํ™•๋ฅ ์ด ๋„ˆ๋ฌด ๋‚ฎ์€ 0.00001๊ณผ ๊ฐ™์€ ๋ฐ์ดํ„ฐ๋Š” ์ œ์™ธ๋ฅผ ๊ณ ๋ คํ•ด์•ผ ํ•œ๋‹ค.

Logistic Regression
→ ํ†ต๊ณ„: ํšŒ๊ท€(Regress) ๋ชจ๋ธ.
๋ถ„๋ฅ˜๊ธฐ๋กœ ๋Œ€์ถœ์ด๋‚˜ ์‹ ์šฉํ‰๊ฐ€ ์Šน์ธ์—ฌ๋ถ€์—์„œ ์‚ฌ์šฉ๋จ.

์„ ํ˜• ํšŒ๊ท€ ๊ทธ๋ž˜ํ”„.
z๊ฐ€ ๊ตฌํ•˜๊ณ ์žํ•˜๋Š” ์„ ํ˜•


์ด ์ฑ… ์ถ”์ฒœํ•œ๋‹ค๊ณ  ํ•จ

 

๋ฐ˜์‘ํ˜•