解決問題
FutureWarning: max_iter and tol parameters have been added in <class 'sklearn.linear_model.stochastic_gradient.SGDClassifier'> in 0.19. If both are left unset, they default to max_iter=5 and tol=None. If tol is not None, max_iter defaults to max_iter=1000. From 0.21, default max_iter will be 1000, and default tol will be 1e-3.
"and default tol will be 1e-3." % type(self), FutureWarning)
解決思路
未來警告:在0.19中的<class'sklearn.linear_model.randomatic_gradient.sgdclassifier'>中添加了max_iter和tol參數。如果兩個都未設置,則默認爲max_iter=5,tol=none。如果tol不是none,max-iter默認爲max-iter=1000。從0.21開始,默認的最大值爲1000,默認的公差爲1e-3。“默認TOL將爲1E-3。
解決方法
stochastic_gradient模塊已經被重構,在未來的版本中默認參數有所改變!此信息提示爲警告,即使不處理也不會影響代碼編程。如果想要去掉,可以更新庫至最新版本,然後使用最新版本stochastic_gradient方法,並要知道默認參數已經隨着版本升級而改變了。