cannot import name 'pinv2' from 'scipy.linalg'
时间: 2023-08-30 14:09:15 浏览: 331
The error message you encountered suggests that the 'pinv2' function is not available in the 'scipy.linalg' module. This function is used by the ELMRegressor class in the sklearn_extensions package.
The 'pinv2' function was introduced in SciPy version 1.7.0. If you are using an older version of SciPy, you may encounter this error. To resolve this issue, you can upgrade your SciPy package to the latest version by running the following command:
```shell
pip install --upgrade scipy
```
After upgrading SciPy, try importing ELMRegressor again. It should now be able to find the 'pinv2' function without any issues.
If you already have the latest version of SciPy installed and still encounter this error, it could be due to a compatibility issue between the sklearn_extensions and SciPy versions. In such cases, you may need to use an older version of sklearn_extensions or find an alternative implementation for ELM regression that is compatible with your setup.
阅读全文