Closed arjunpuri7 closed 5 years ago
Hi @arjunpuri7, the evaluate_oversamplers
function takes a list of datasets to evaluate on, therefore, all you need to do is put the dataset specification in a list as
datasets=[{'data':X,'target':Y,'name':'glass0'}]
Let me know if it works!
i try and it works thanks
I want to use evaluate_oversampler method on my datasets and perform following steps: import smote_variants as sv import pandas as pd import numpy as np data=pd.read_csv(".........original/glass0.csv") x=data.drop('10',axis=1) X=x.as_matrix() y=data.iloc[:,-1] Y=y.as_matrix() datasets={'data':X,'target':Y,'name':'glass0'} print(datasets) oversamplers= [sv.SMOTE_ENN, sv.NEATER, sv.Lee] classifiers= [KNeighborsClassifier(n_neighbors= 3), KNeighborsClassifier(n_neighbors= 5), DecisionTreeClassifier()] cache_path= 'C:/Users/hp/Desktop/python codes/structure'
results= sv.evaluate_oversamplers(datasets, oversamplers, classifiers, cache_path)
after applying all this i get an error;