Reputation: 525
I just generated a dataset, and from the scatter plot I think these scatters are quite separable. But I really don't know why the Linear SVC-sklearn worked very bad. The dataset scatters plot and the SVC result are below:
scatter plot Linear SVC result
The code I use is like
from sklearn.svm import LinearSVC
svc = LinearSVC()
model = svc.fit(X, y)
Could anyone help me with that problem? I really think SVM should have a better result.
The dataset csv file is here: data csv file
The first two columns are x and y respectively, and the third column is the data label.
Upvotes: 0
Views: 370
Reputation: 2129
Assuming your data is centered set your fit_intercept
to False
. You might do better here with less regularization, by increasing the cost of the error (C=100
):
svc = LinearSVC(fit_intercept=False, C=100)
Upvotes: 2