fit_resample()缺少1个必需的位置参数:“ y”
这是**适合参数的问题吗?
count_vect=CountVectorizer()
tfidf_transformer = TfidfTransformer()
smote = SMOTE()
lsvc=LinearSVC(penalty='l1', loss='squared_hinge', dual=False,tol=1e-5)
pipeline= Pipeline([('count_vect',count_vect),('tfidf_transformer',tfidf_transformer),('smote',SMOTE),('lsvc',lsvc)])
X_train, X_test, y_train, y_test = train_test_split(df['Réclamation'], df['Catégorie'],test_size=0.1)
model = pipeline.fit(X_train,y_train)
我没有弄清楚背后的真正问题
27 X_train, X_test, y_train, y_test = train_test_split(df['Réclamation'], df['Catégorie'],test_size=0.1)
---> 28 model = pipeline.fit(X_train,y_train)
--> 342 return self.func(*args, **kwargs)
--> 576 X_res, y_res = sampler.fit_resample(X, y, **fit_params)
fit_resample() missing 1 required positional argument: 'y'
我没有弄清楚任何帮助背后的真正问题,谢谢