AymanELS / Machine-Learning-Platform-for-Phishing-Detection

2 stars 0 forks source link

Error while running on Emails - IWSPA-AP dataset #29

Open dasavisha opened 6 years ago

dasavisha commented 6 years ago

Traceback (most recent call last): File "main.py", line 331, in main() File "main.py", line 246, in main X_train, selection = Feature_Selection.Feature_Ranking(X_train, y_train,k, feature_list_dict_train) File "/home/avisha/S&P_18/Feature_Extraction_Platform/Feature_Selection.py", line 50, in Feature_Ranking rfe.fit(X,y) File "/home/avisha/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/rfe.py", line 134, in fit return self._fit(X, y) File "/home/avisha/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/rfe.py", line 173, in _fit estimator.fit(X[:, features], y) File "/home/avisha/anaconda3/lib/python3.6/site-packages/sklearn/linear_model/logistic.py", line 1233, in fit sample_weight=sample_weight) File "/home/avisha/anaconda3/lib/python3.6/site-packages/sklearn/svm/base.py", line 853, in _fitliblinear " class: %r" % classes[0]) ValueError: This solver needs samples of at least 2 classes in the data, but the data contains only one class: 1

shahryarabaki commented 6 years ago

It seems there is only one class in the dataset, right?

AymanELS commented 6 years ago

I tried running it on IWSPA training dataset. It worked fine for me...

dasavisha commented 6 years ago

Still giving errors. Anytime you want to meet and look into the error? Please let me know.