0

I am trying to fit a model using SVM with the Adversarial Robustness Toolbox classifier estimator, but i receive the following error when i try to fit it.

File ~\OneDrive\Documents\ids\cba.py:58 in <module>
    classifier.fit(X_train, y_train)

  File ~\AppData\Roaming\Python\Python39\site-packages\art\estimators\classification\classifier.py:73 in replacement_function
    return fdict[func_name](self, *args, **kwargs)

  File ~\AppData\Roaming\Python\Python39\site-packages\art\estimators\classification\scikitlearn.py:176 in fit
    self.model.fit(x_preprocessed, y_preprocessed, **kwargs)

  File C:\ProgramData\Anaconda3\lib\site-packages\sklearn\svm\_base.py:199 in fit
    y = self._validate_targets(y)

  File C:\ProgramData\Anaconda3\lib\site-packages\sklearn\svm\_base.py:720 in _validate_targets
    raise ValueError(

ValueError: The number of classes has to be greater than one; got 1 class

when i run the following code, it shows that i have 2 different labels

np.unique(y_train)
Out[3]: array([0, 1])

0 Answers0