下面的代码用于音频文件分割。
from pyAudioAnalysis import audioSegmentation as aS
[flagsInd, classesAll, acc, CM] = aS.mtFileClassification("diarizationExample.wav", "svmSM", "svm", True, 'dar.segments.txt')它给了我这个警告:
C:\Users\Kenzhegaliyev_EK\AppData\Local\Continuum\anaconda3\lib\site-packages\pydub\utils.py:165: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
C:\Users\Kenzhegaliyev_EK\AppData\Local\Continuum\anaconda3\lib\site-packages\sklearn\utils\deprecation.py:144: FutureWarning: The sklearn.svm.classes module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.svm. Anything that cannot be imported from sklearn.svm is now part of the private API.
warnings.warn(message, FutureWarning)
C:\Users\Kenzhegaliyev_EK\AppData\Local\Continuum\anaconda3\lib\site-packages\sklearn\base.py:318: UserWarning: Trying to unpickle estimator SVC from version 0.19.1 when using version 0.22.1. This might lead to breaking code or invalid results. Use at your own risk.
UserWarning)这个错误是:
C:\Users\Kenzhegaliyev_EK\AppData\Local\Continuum\anaconda3\lib\site-packages\sklearn\svm\_base.py in predict(self, X)
583 """
584 check_is_fitted(self)
--> 585 if self.break_ties and self.decision_function_shape == 'ovo':
586 raise ValueError("break_ties must be False when "
587 "decision_function_shape is 'ovo'")
AttributeError: 'SVC' object has no attribute 'break_ties'显然,这是SVC的旧版本和更新版本之间的冲突。
在警告中,它告诉我应该使用sklearn版本= 0.19.1
我试着安装当前版本并升级到旧版 sklearn。我不能使用shell,它是受限制的,所以我在jupyter中运行所有代码:
!pip install sklearn
Installing collected packages: sklearn
Successfully installed sklearn-0.0
import sklearn
sklearn.__version__
'0.22.1'
!pip install --upgrade sklearn==0.19.1
ERROR: Could not find a version that satisfies the requirement sklearn==0.19.1 (from versions: 0.0)
ERROR: No matching distribution found for sklearn==0.19.1官方的滑雪板网站上没有0.19.1版
基于Web的文档可用于下列版本: Scikit-学习0.23.dev0 (dev)文档(PDF48.5MB) Scikit-学习0.22.1 (稳定)文档(PDF48.5MB) Scikit-学习0.21.3文档(PDF 46.7 MB) Scikit-学习0.20.4文档(PDF 45.2 MB) Scikit-学习0.19.2文档(PDF42.2MB) Scikit-学习0.18.2文档(PDF 46.5 MB) Scikit-学习0.17.1文档(PDF46.0MB) Scikit-学习0.16.1文档(PDF-56.8MB)
我试过安装任何其他旧的滑雪板,什么是可用的:
!pip install --upgrade sklearn==0.18.2
ERROR: Could not find a version that satisfies the requirement sklearn==0.18.2 (from versions: 0.0)
ERROR: No matching distribution found for sklearn==0.18.2
!pip install --upgrade sklearn==0.19.2
ERROR: Could not find a version that satisfies the requirement sklearn==0.19.2 (from versions: 0.0)
ERROR: No matching distribution found for sklearn==0.19.2如何安装正确的旧滑雪板,使用旧的兼容SVC使错误消失?
发布于 2020-01-15 08:56:52
雪橇的发行版本很少。这是因为正确的名称是scikit-learn:https://pypi.org/project/scikit-learn/#history
所以快跑
!pip install --upgrade scikit-learn==0.19.1https://stackoverflow.com/questions/59745062
复制相似问题