Csr matrix (scikit-learn svm.SVC coef_ attribute) -


i have sklearn.svm.svc object , train data. need first n values of

v = tfidfvectorizer() train_data = v.fit_transform(data) clf2 = svc(kernel='linear') clf2.fit(train_data, train_target) print clf.coef_ 

in order valuable words in set, need absolute values of clf2.coef_ sparse matrix. how can first n words absolute values?


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -