小白一枚,剛開始學機器學習,之前在sklearn.linear_model里import不了RamdomizedLogisticRegression
在網上找了一下答案,原來是因為“sklearn(版本0.21.3)的linear_model檔案夾下面已經沒有randomized_l1.py檔案,而RandomizedLogisticRegression就在該檔案內。RandomizedLogisticRegression已經被移出sklearn包,移到了 scikit-learn-contrib/stability-selection中(安裝方法詳見鏈接)。”
所以我按照https://blog.csdn.net/michaelguangg/article/details/100036650這里提到的方法下載stability-selection,并且安裝成功,
from stability_selection.randomized_lasso import RandomizedLogisticRegression也正常。
但是當我寫了
r1=RLR()
r1.fit(x,y)
r1.get_support()
時報錯,'RandomizedLogisticRegression' object has no attribute 'get_support'
請問各路大神,這個問題如何解決啊?
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/117902.html
標籤:人工智能技術
下一篇:r語言分析作者合作網路的時候
