Closed vahidsoheilkish closed 4 years ago
change SMOTE parameters to these parameters it will work. because new version of library deprecated some parameters smote_model = SMOTE(sampling_strategy='auto', random_state=None, k_neighbors=15 , n_jobs=1 )
Hello, I try to run the Code but give me error in line 240 (SMOTE) ratio, please help me Cross validation Algrithm: GBT Repeat: 100 ............................. Run# 0 Using split-1 as test data.. Training classifier model.. C:\Users\darkcoder\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sklearn\feature_extraction\text.py:383: UserWarning: Your stop_words may be inconsistent with your preprocessing. Tokenizing the stop words generated tokens ['ani', 'continu', 'deleg', 'doe', 'doubl', 'dure', 'els', 'endwhil', 'extend', 'implement', 'includ', 'interfac', 'namespac', 'nativ', 'nowwhil', 'onc', 'ourselv', 'overrid', 'packag', 'privat', 'protect', 'rais', 'readon', 'requir', 'sign', 'synchron', 'themselv', 'tri', 'veri', 'yourselv'] not in stop_words. warnings.warn('Your stop_words may be inconsistent with ' Traceback (most recent call last): File "C:/Users/darkcoder/Desktop/desktop/SentiCR-master/SentiCR/SentiCR.py", line 350, in
(precision, recall, f1score, accuracy)=ten_fold_cross_validation(oracle_data,ALGO)
File "C:/Users/darkcoder/Desktop/desktop/SentiCR-master/SentiCR/SentiCR.py", line 292, in ten_fold_cross_validation
classifier_model=SentiCR(algo=ALGO,training_data= dataset[train])
File "C:/Users/darkcoder/Desktop/desktop/SentiCR-master/SentiCR/SentiCR.py", line 195, in init
self.model = self.create_model_from_training_data()
File "C:/Users/darkcoder/Desktop/desktop/SentiCR-master/SentiCR/SentiCR.py", line 240, in create_model_from_training_data
smote_model = SMOTE(ratio=0.5, random_state=None, k=None, k_neighbors=15, m=None, m_neighbors=15, out_step=.0001,
File "C:\Users\darkcoder\AppData\Local\Programs\Python\Python38-32\lib\site-packages\imblearn\utils_validation.py", line 640, in inner_f
return f(**kwargs)
TypeError: init() got an unexpected keyword argument 'ratio'