Xtra-Computing / thundersvm

ThunderSVM: A Fast SVM Library on GPUs and CPUs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

thundersvm does not support sklearn

BinchaoPeng opened this issue · comments

commented

thundersvm lacks necessary attributes so that I can not use thundersvm in sklearn.
for example, thundersvm can not be used in GridSearchCV of sklearn.
and, thundersvm can not be used in StackingClassifier of sklearn.

看介绍里可以用grid.sh脚本实现网格搜索。但我目前还没实现。不知道如何在python中使用grid.sh。期望可以得到帮助,3ku~
`#!/usr/bin/bash

DATASET=$1
OPTIONS=
N_FOLD=5
for c in 1 3 10 30 100
do
for g in 0.1 0.3 1 3 10
do
bin/thundersvm-train -c ${c} -g ${g} -v ${N_FOLD} ${OPTIONS} ${DATASET}
done
done`
https://thundersvm.readthedocs.io/en/latest/how-to.html#how-can-i-do-grid-search
复制后在浏览器打开

A GridSearchCV consists of a for statement and a Fold, which is composed of a combination of parameters. It can be implemented using KFold for regression problems and StratifiedKFold for classification problems.

It can be easily implemented with the ParameterGrid in sklearn.model_selection.