๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ‘จ‍๐Ÿซ

[Sklearn] ConvergenceWarning: lbfgs failed to converge (status=1)

by geum 2021. 5. 28.

 

์‚ฌ์ดํ‚ท๋Ÿฐ์˜ 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๋ฅผ ์ง€์ •ํ•ด์ฃผ๋ฉด ๋œ๋‹ค.

 

 

๊น”๋”!

๋Œ“๊ธ€