f*********y 发帖数: 376 | 1 用的是R中的e1071 package
data 包含 60 variable, 3.5 w observations
linear kernel 要 4hr, polynomial kernel 要 20+hr...
怎么提高速度呢? 非常感谢!
如果将需要把最后的model用C++实现, 进行分类, 会不会很耗时间, 若kernel不是
linear的话. |
M*******g 发帖数: 41 | 2 建议你用Jordan 他们的办法。
http://www.cs.berkeley.edu/~jordan/fasp.html
先用kmeans()聚类压缩数据,比如得到1000个类簇;
然后在前一步kmeans()得到的1000个类簇中心上运行SVM;
最后属于同一个类簇的所有点得到相同的label,也就是各
个类簇中心的label。
我前一段时间有一个很大的数据,50多万个点,20个特征,
需要运行谱聚类(spectral clustering),结果他们的算法
五分多钟就算完了。虽然他们的算法是聚类问题,
你是分类问题但是原理应该差不多。
【在 f*********y 的大作中提到】 : 用的是R中的e1071 package : data 包含 60 variable, 3.5 w observations : linear kernel 要 4hr, polynomial kernel 要 20+hr... : 怎么提高速度呢? 非常感谢! : 如果将需要把最后的model用C++实现, 进行分类, 会不会很耗时间, 若kernel不是 : linear的话.
|
f*********y 发帖数: 376 | 3 thanks a lot! I will read it carefully at first.
【在 M*******g 的大作中提到】 : 建议你用Jordan 他们的办法。 : http://www.cs.berkeley.edu/~jordan/fasp.html : 先用kmeans()聚类压缩数据,比如得到1000个类簇; : 然后在前一步kmeans()得到的1000个类簇中心上运行SVM; : 最后属于同一个类簇的所有点得到相同的label,也就是各 : 个类簇中心的label。 : 我前一段时间有一个很大的数据,50多万个点,20个特征, : 需要运行谱聚类(spectral clustering),结果他们的算法 : 五分多钟就算完了。虽然他们的算法是聚类问题, : 你是分类问题但是原理应该差不多。
|
f*********y 发帖数: 376 | 4 Hi, I have another thought.
Does the feature number matters much or the obs matters much?
Since I have about 60 features, I think I can sort the cofficients of
features in linear SVM, and delete some of features due to their small
coefficents. Then I can rerun SVM using other kernels..
【在 M*******g 的大作中提到】 : 建议你用Jordan 他们的办法。 : http://www.cs.berkeley.edu/~jordan/fasp.html : 先用kmeans()聚类压缩数据,比如得到1000个类簇; : 然后在前一步kmeans()得到的1000个类簇中心上运行SVM; : 最后属于同一个类簇的所有点得到相同的label,也就是各 : 个类簇中心的label。 : 我前一段时间有一个很大的数据,50多万个点,20个特征, : 需要运行谱聚类(spectral clustering),结果他们的算法 : 五分多钟就算完了。虽然他们的算法是聚类问题, : 你是分类问题但是原理应该差不多。
|
M*******g 发帖数: 41 | 5 运行时间应该跟点数成平方关系而跟特征个数成线性关系。
所以对大数据集计算的瓶颈在点的个数上。
当然你如果能让GRAM 炬阵稀疏化也可以,
但效果不会有缩小点数来得明显。
【在 f*********y 的大作中提到】 : Hi, I have another thought. : Does the feature number matters much or the obs matters much? : Since I have about 60 features, I think I can sort the cofficients of : features in linear SVM, and delete some of features due to their small : coefficents. Then I can rerun SVM using other kernels..
|
L*****k 发帖数: 327 | 6 为什么要用R run SVM?网上各种好用的SVM package
【在 f*********y 的大作中提到】 : 用的是R中的e1071 package : data 包含 60 variable, 3.5 w observations : linear kernel 要 4hr, polynomial kernel 要 20+hr... : 怎么提高速度呢? 非常感谢! : 如果将需要把最后的model用C++实现, 进行分类, 会不会很耗时间, 若kernel不是 : linear的话.
|
f*********y 发帖数: 376 | 7 do you know any other SVM package with faster speed?
the size of problem may make any package run as slow as possible
【在 L*****k 的大作中提到】 : 为什么要用R run SVM?网上各种好用的SVM package
|
B******5 发帖数: 4676 | 8 e1071不就是那个最popular的package的接口
【在 L*****k 的大作中提到】 : 为什么要用R run SVM?网上各种好用的SVM package
|