๐จ๐ซ
[Sklearn] ConvergenceWarning: lbfgs failed to converge (status=1)
geum
2021. 5. 28. 16:41
์ฌ์ดํท๋ฐ์ LogisticRegression ๋ชจ๋์ importํด์ ์ฌ์ฉํ ํ์ ์์ ๊ฐ์ ์๋ฌ ์ฐฝ์ด ๋ด๋ค. ์๋ฌ ๋ด์ฉ์ Increase the number of iterations (max_iter) or scale the data as shown in ~ ์ด๋ผ๋ ๋ฌธ๊ตฌ๊ฐ ์๋ ๊ฑธ ๋ด์๋
1) ๋ฐ๋ณต ํ์์ max๋ฅผ ํฌ๊ฒ ํ๊ฑฐ๋
2) ์๋ ๋งํฌ๋ฅผ ๋ฐ๋ผ ๋ฐ์ดํฐ๋ฅผ ์กฐ์ ํด์ฃผ๊ฑฐ๋
๋ ์ค ํ๋์ ๋ฐฉ๋ฒ์ผ๋ก ํด๊ฒฐํ ์ ์์ ๊ฒ ๊ฐ๋ค. LogisticRegression์ max_iter ๊ธฐ๋ณธ๊ฐ์ 100์ธ๋ฐ 100๋ณด๋ค ํฐ ์๋ก max_iter๋ฅผ ์ง์ ํด์ฃผ๋ฉด ๋๋ค.
๊น๋!