2012/10/15 θζΊε (Zhibo Xiao) / Sean <[email protected]>: > Hi everyone! > > Right now, I am trying to port Jun Zhu's MedLDA model in Python, which is a > deterministic topic model. > > Right now, I am using 20 newsgroup data crawled by scikit-learn's provided > script. > > In the original code, the author used SVMLight to preform large-margin > learning, while scikit-learn uses LibSVM, so I have some problems get things > done. > > Is there any way in scikit-learn to get the document number for the support > vectors? Since classification is not my sole purpose, document number is > quite curcial for the topic modeling stage. I looked over the reference > section on the scikit-learn website, but couldn't find how to get the doc > number for support vectors.
It seems to be stored in the `clf.support_` attribute. > Another problem concerns the dual coefficients, in the documents, dual_coef_ > which holds the product y_i * alpha_i. Right now, I want to get alpha_i, is > it OK that i just use dual_coef_ / y_i to get alpha_i ? No idea, you should probably dive into the source code, in particular those files: https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/svm/libsvm.pyx https://github.com/scikit-learn/scikit-learn/tree/master/sklearn/svm/src/libsvm -- Olivier http://twitter.com/ogrisel - http://github.com/ogrisel ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
