[Python] ๋จธ์ ๋ฌ๋ 04_์ ํํ๊ท๋ชจ๋ธ, ๋คํญํ๊ท๋ชจ๋ธ(๊ณก์ )
ํ๋ก๊ทธ๋๋ฐ ์ธ๊ณ๋ฅผ ํ๊ตฌํฉ์๋ค. ํ๊ท๋ชจ๋ธ ์ข
๋ฅ ์ ํํ๊ท๋ชจ๋ธ, ๋คํญํ๊ท๋ชจ๋ธ, ๋ค์คํ๊ท๋ชจ๋ธ, ๋ฆฟ์ง, ๋ผ์, ๋๋คํฌ๋ ์คํธ, ๊ทธ๋ ๋์ธํธ๋ถ์คํธ, ํ์คํ ๊ทธ๋จ๊ทธ๋ ๋์ธํธ๋ถ์คํธ, XGBoost, ๊ธฐํ ๋ฑ๋ฑ ์ฃผ๋ก ์ฌ์ฉ๋๋ ํ๊ท๋ชจ๋ธ ๋ฆฟ์ง, ํ์คํ ๊ทธ๋จ๊ทธ๋ ๋์ธํธ๋ถ์คํธ, XGBoost ์ ํํ๊ท๋ชจ๋ธ(LR; Liner Regression Model) ### ๋ชจ๋ธ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๋ถ๋ฌ๋ค์ด๊ธฐ from sklearn.linear_model import LinearRegression ์ฌ์ฉํ ๋ฐ์ดํฐ ### ์ฌ์ฉํ ๋ฐ์ดํฐ train_input, train_target, test_input, test_target ๋ชจ๋ธ ์์ฑํ๊ธฐ ###๋ชจ๋ธ ์์ฑํ๊ธฐ lr = LinearRegression() lr ๋ชจ๋ธ ํ๋ จ์ํค๊ธฐ ### ๋ชจ๋ธ ํ๋ จ์ํค๊ธฐ lr.fit(tra..
2023. 12. 25.
[Python] ๋จธ์ ๋ฌ๋ 03_KNN ํ๊ท๋ชจ๋ธ
ํ๋ก๊ทธ๋๋ฐ ์ธ๊ณ๋ฅผ ํ๊ตฌํฉ์๋ค. KNN ํ๊ท๋ชจ๋ธ ๋ฐ์ดํฐ import numpy as np ### ๋์ด ๊ธธ์ด perch_length = np.array( [8.4, 13.7, 15.0, 16.2, 17.4, 18.0, 18.7, 19.0, 19.6, 20.0, 21.0, 21.0, 21.0, 21.3, 22.0, 22.0, 22.0, 22.0, 22.0, 22.5, 22.5, 22.7, 23.0, 23.5, 24.0, 24.0, 24.6, 25.0, 25.6, 26.5, 27.3, 27.5, 27.5, 27.5, 28.0, 28.7, 30.0, 32.8, 34.5, 35.0, 36.5, 36.0, 37.0, 37.0, 39.0, 39.0, 39.0, 40.0, 40.0, 40.0, 40.0, 42.0, 43..
2023. 12. 22.