svmlight

R - convert a data frame to a data set formatted as featureName:featureValue [duplicate]

旧时模样 提交于 2019-12-31 00:49:14
问题 This question already has answers here : read/write data in libsvm format (6 answers) Closed 5 years ago . It turns out the format I wanted is called "SVM-Light" and is described here http://svmlight.joachims.org/. I have a data frame that I would like to convert to a text file with format as follows: output featureIndex:featureValue ... featureIndex:featureValue So for example: t = structure(list(feature1 = c(3.28, 6.88), feature2 = c(0.61, 1.83 ), output = c("1", "-1")), .Names = c(

Azure Machine Learning Web service Input Data Issue

眉间皱痕 提交于 2019-12-25 07:13:27
问题 I have created an Azure ML webservice as an example and face an unknown error when it comes to deploy a web service. The error comes without an explanation, so it's hard to trace. When running the experiment within the studio, the experiment was running without any issue. However, when deploy to webservice, the test function has failed with the same input as in the studio. I have also published a sample of the service to see if anyone can see what the issue is. https://gallery

What does each item mean in svmLight Format

余生颓废 提交于 2019-12-12 20:52:22
问题 I am very confused about what each part means in a svmLight data format. For example: (label/target, [(feature, value), ...], queryid) Does the label means the rank of the data and queryid is the id of the object? For example: for the following item: 2 qid:1 1:4.000000 2:2.772589 3:0.266667 4:0.258154 5:37.330565 6:11.431241 7:37.307017 8:1.213630 9:21.342267 10:10.842279 11:15.634736 12:2.749495 13:-39.467448 14:-37.791635 15:-38.002289 16:14.000000 17:5.634790 18:0.063927 19:0.063290 20:28

error loading svm learning configuration file in gate tool

核能气质少年 提交于 2019-12-12 03:24:08
问题 I am new to machine learning. When I tried learning through gate, it is showing some error. The learning configuration file is given below. <?xml version="1.0"?> <ML-CONFIG> <SURROUND value="false"/> <FILTERING ratio='0.2' dis='far'/> <EVALUATION method="holdout" runs="2" ratio="0.66"/> <multiClassification2Binary method="one-vs-anothers" thread-pool-size="2"/> <PARAMETER name="thresholdProbabilityBoundary" value="1.0"/> <PARAMETER name="thresholdProbabilityEntity" value="1.0"/> <PARAMETER

Python file format for email classification with svm-light

房东的猫 提交于 2019-12-12 02:53:40
问题 I am working with email subject, so I have 20 emails i want to classify, and a file with 20 lines - one line has one email subject.I have been working on it, but I am unable to figure out what the features refer to and the format of the input file for svmlight. Any tips to proceed will be helpful. Thanks in advance! Edit: I have taken the tf-idf of the first 500 subject lines as a trial. However, according to svm-light format, we need: <line> .=. <target> <feature>:<value> <feature>:<value> .

Libsvm model file format No model number

痴心易碎 提交于 2019-12-12 01:51:22
问题 I am using libsvm for document classification. I use svm.cc and svm.h in my project. I then call svm_train. I save the model in a file using svm_save_model. I have there categories. The svm model file is: svm_type c_svc kernel_type rbf gamma 0.001002 nr_class 3 total_sv 9 rho -0.000766337 0.00314423 0.00387654 label 0 1 2 nr_sv 3 3 3 SV 1 1 1:0.001 2:0.001 3:0.012521912 5:0.001 15:0.012521912 17:0.012521912 23:0.001 1 1 1:0.001 2:0.014176543 4:0.093235799 6:0.001 7:0.0058630699 9:0.040529628

dyld: Library not loaded: lib/libopencv_core.3.0.dylib Reason: image not found

痴心易碎 提交于 2019-12-07 02:41:08
问题 I am getting the following issue: /Users/luke/Desktop/trainHOG/trainhog ; exit; dyld: Library not loaded: lib/libopencv_core.3.0.dylib Referenced from: /Users/luke/Desktop/trainHOG/trainhog Reason: image not found Trace/BPT trap: 5 logout I am using a Mac running OSX v10.9.5 with openCV 3.0 alpha. The library in question is definitely in the folder. I have tried deleting it and pasting it back into the folder, I have completely deleted and reinstalled openCV and macports, and I have tried the

Load svmlight format error

和自甴很熟 提交于 2019-12-02 17:07:13
问题 When I try to use the svmlight python package with data I already converted to svmlight format I get an error. It should be pretty basic, I don't understand what's happening. Here's the code: import svmlight training_data = open('thedata', "w") model=svmlight.learn(training_data, type='classification', verbosity=0) I've also tried: training_data = numpy.load('thedata') and training_data = __import__('thedata') 回答1: One obvious problem is that you are truncating your data file when you open it