You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking at the electricity dataset https://www.openml.org/d/151
as a benchmark for Fast Kernel Classifier. X.shape = (45312, 8) which I feel should be a good candidate for this model to be fast.
However, SVC is about 10% or 20% faster.
fromsklearn.datasetsimportfetch_openmlfromsklearn.svmimportSVCfromsklearn.model_selectionimportcross_validateimportpandasaspdfromsklearn.preprocessingimportStandardScalerfromsklearn.pipelineimportmake_pipelineimportnumpyasnpdata=fetch_openml(data_id=151)
X=pd.DataFrame(data.data)
y=pd.Series(data.target)
svc=SVC(kernel='rbf', gamma='scale',
random_state=1)
svc_cv=cross_validate(make_pipeline(StandardScaler(), svc), X, y, cv=10)
print('Fit time \t', np.mean(svc_cv['fit_time']))
print('Score \t\t', np.mean(svc_cv['test_score']))
fromsklearn_extra.kernel_methodsimportEigenProClassifierasFKCEigenProepc=FKCEigenPro(kernel='rbf', gamma='scale',
random_state=1)
epc_cv=cross_validate(make_pipeline(StandardScaler(), epc), X, y, cv=10)
print('Fit time \t', np.mean(epc_cv['fit_time']))
print('Score \t\t', np.mean(epc_cv['test_score']))
Any idea what's going on here? The time is basically exclusively spent in the _kernel method.
Running the same script with this dataset: https://www.openml.org/d/4534 "PhishingWebsites" is even a bigger difference, it seems; FKC takes 10 seconds, SVC takes 2.
I'm looking at the electricity dataset https://www.openml.org/d/151
as a benchmark for Fast Kernel Classifier.
X.shape = (45312, 8)
which I feel should be a good candidate for this model to be fast.However, SVC is about 10% or 20% faster.
Any idea what's going on here? The time is basically exclusively spent in the
_kernel
method.cc @Alex7Li
The text was updated successfully, but these errors were encountered: