'DBSCAN' object has no attribute 'predict'
时间: 2023-10-08 20:13:06 浏览: 367
在DBSCAN算法中,使用fit_predict()方法来进行聚类预测,而不是使用predict()方法。所展示的代码片段中使用了fit_predict()方法来对数据进行聚类,并将结果可视化显示。因此,如果你遇到了"'DBSCAN' object has no attribute 'predict'"的错误,那可能是因为你错误地使用了predict()方法而不是fit_predict()方法。请确保你正确地使用fit_predict()方法来进行聚类预测。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [用Sklearn封装的KMeans | DBSCAN算法详解 |【问题解决】AttributeError: ‘NoneType‘ object has no ...](https://blog.csdn.net/qq_44731019/article/details/129283316)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文