Machine learning 过采样:SMOTE参数';比率';

Machine learning 过采样:SMOTE参数';比率';,machine-learning,cross-validation,oversampling,imbalanced-data,imblearn,Machine Learning,Cross Validation,Oversampling,Imbalanced Data,Imblearn,jupyter笔记本给我带来错误: init()获得意外的关键字参数“ratio” 我的代码: smote=smote(比率='少数',随机状态=10) 还可以尝试: smote=smote(比率=0.5,随机状态=10) 但它给了我同样的错误信息 如何解决这个问题?谢谢。请查看此处的文档: 参数“ratio”不存在。 正确的论据是“抽样策略”。因此,在代码中: smote=SMOTE(sampling_strategy='not minority',random_state=10) #equi

jupyter笔记本给我带来错误:

init()获得意外的关键字参数“ratio”

我的代码:

smote=smote(比率='少数',随机状态=10)

还可以尝试:
smote=smote(比率=0.5,随机状态=10)
但它给了我同样的错误信息


如何解决这个问题?谢谢。

请查看此处的文档: 参数“ratio”不存在。 正确的论据是“抽样策略”。因此,在代码中:

smote=SMOTE(sampling_strategy='not minority',random_state=10) #equivalent to sampling_strategy=1.0 for binary classification, but also works for multiple classes
#or
smote=SMOTE(sampling_strategy=0.5,random_state=10) #only for binary classification

请查看此处的文档: 参数“ratio”不存在。 正确的论据是“抽样策略”。因此,在代码中:

smote=SMOTE(sampling_strategy='not minority',random_state=10) #equivalent to sampling_strategy=1.0 for binary classification, but also works for multiple classes
#or
smote=SMOTE(sampling_strategy=0.5,random_state=10) #only for binary classification
比率已弃用。现在,采样策略的作用与不推荐使用doratio的比率相同。现在,抽样策略和过去的比率做了同样的事情