DBSCAN.__init__() takes from 1 to 2 positional arguments but 3 were given是什么错误
时间: 2023-10-31 19:35:10 浏览: 170
这个错误通常是因为你在调用 `DBSCAN` 类的构造函数时,传递了多余的参数。`DBSCAN` 构造函数只需要 1 或 2 个参数,而你传递了 3 个参数。
请检查一下你的代码,看看是否有多余的参数传递给了 `DBSCAN` 构造函数。如果有,可以将多余的参数删除或者修改为符合 `DBSCAN` 构造函数要求的参数。
相关问题
DBSCAN.__init__() takes from 1 to 2 positional arguments but 3 were given
This error message indicates that you are passing three positional arguments to the `__init__()` method of the `DBSCAN` class, but it is designed to take only one or two positional arguments.
To fix this error, you should check the number of arguments you are passing to the `DBSCAN` constructor and make sure that it matches the number of arguments that the constructor expects. Alternatively, you may need to modify the `DBSCAN` class to accept the additional argument that you are passing.
阅读全文