让 SVM 更快、更可靠的最佳方法是什么?

What could be the best way to make your SVM faster and reliable?

我是数据挖掘新手。我已经实现了我的线性 SVM,如下所示。

X_train, X_test, y_train, y_test, = train_test_split(X, y, test_size=0.1, random_state = 0)
#print X_train.shape, y_train.shape
#print X_test.shape, y_test.shape

clf = svm.SVC(kernel='linear', C=1).fit(X_train, y_train)
print clf.score(X_test, y_test)

clf = svm.SVC(kernel='linear', C=1)
scores = cross_val_score(clf, X, y, cv=10)
print scores

print("Accuracy: %0.2f (+/- %0.2f)" % (scores.mean(), scores.std()*2 ))

tuned_parameters = [{'kernel': ['rbf'], 'gamma': [1e-3, 1e-4],'C': [1, 10, 100, 1000]},{'kernel': ['linear'], 'C': [1, 10, 100, 1000]}]
scores = ['precision', 'recall']
svr = svm.SVC(C=1)
for score in scores:
    print("# Tuning hyper-parameters for %s"% score)
    clf =GridSearchCV(svr, tuned_parameters, cv=10,scoring='%s_macro'% score)
    clf.fit(X_train, y_train)
    print("best parameters %s" % clf.best_params_)

在这里,我的数据太大了,我应该怎么做才能使我的线性 svm 非常快地 运行?

仅对样本进行参数调整。

找到合适的参数后,再使用整个数据集。