Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Tweeted twitter.com/StackMma/status/767050921297805312
added 2 characters in body; edited tags
Source Link
Karsten7
  • 27.6k
  • 5
  • 74
  • 135

Under the hood Mathematica uses libsvm, so I don't think this question is beyond the pale.

I need to export an svm I trained with Classify to the standard SVM Format (which is readable by libsvm).

The SVM format obeys the following Backus-Naur Form (see http://www.cs.cornell.edu/People/tj/svm_light/), it looks like this:

<line> ::= <target> " " (<feature> ":" <value>)+
<target> ::= <positive-integer>
<feature> ::= <positive-integer>
<value> ::= <float>

How can I transform the internal representation of Mathematica's Classifiers into this representation?

Notes:

  • MATLAB provides libsvmread to import svms.
  • In python sklearn.datasets.load_svmlight_file imports svms.
  • Libsvm uses the so called "sparse" format where zero values do not need to be stored.

Under the hood Mathematica uses libsvm, so I don't think this question is beyond the pale.

I need to export an svm I trained with Classify to the standard SVM Format (which is readable by libsvm).

The SVM format obeys the following Backus-Naur Form (see http://www.cs.cornell.edu/People/tj/svm_light/), it looks like this:

<line> ::= <target> " " (<feature> ":" <value>)+
<target> ::= <positive-integer>
<feature> ::= <positive-integer>
<value> ::= <float>

How can I transform the internal representation of Mathematica's Classifiers into this representation?

Notes:

  • MATLAB provides libsvmread to import svms.
  • In python sklearn.datasets.load_svmlight_file imports svms.
  • Libsvm uses the so called "sparse" format where zero values do not need to be stored.

Under the hood Mathematica uses libsvm, so I don't think this question is beyond the pale.

I need to export an svm I trained with Classify to the standard SVM Format (which is readable by libsvm).

The SVM format obeys the following Backus-Naur Form (see http://www.cs.cornell.edu/People/tj/svm_light/), it looks like this:

<line> ::= <target> " " (<feature> ":" <value>)+
<target> ::= <positive-integer>
<feature> ::= <positive-integer>
<value> ::= <float>

How can I transform the internal representation of Mathematica's Classifiers into this representation?

Notes:

  • MATLAB provides libsvmread to import svms.
  • In python sklearn.datasets.load_svmlight_file imports svms.
  • Libsvm uses the so called "sparse" format where zero values do not need to be stored.
added 93 characters in body
Source Link
M.R.
  • 31.8k
  • 8
  • 96
  • 289

Under the hood Mathematica uses libsvm, so I don't think this question is beyond the pale.

I need to export an svm I trained with Classify to the standard SVM Format (which is readable by libsvm).

The SVM format obeys the following Backus-Naur Form (see http://www.cs.cornell.edu/People/tj/svm_light/), it looks like this:

<line> ::= <target> " " (<feature> ":" <value>)+
<target> ::= <positive-integer>
<feature> ::= <positive-integer>
<value> ::= <float>

How can I transform the internal representation of Mathematica's Classifiers into this representation?

Notes:

  • MATLAB provides libsvmread to import svms.
  • In python sklearn.datasets.load_svmlight_file imports svms.
  • Libsvm uses the so called "sparse" format where zero values do not need to be stored.

I need to export an svm I trained with Classify to the standard SVM Format (which is readable by libsvm).

The SVM format obeys the following Backus-Naur Form (see http://www.cs.cornell.edu/People/tj/svm_light/), it looks like this:

<line> ::= <target> " " (<feature> ":" <value>)+
<target> ::= <positive-integer>
<feature> ::= <positive-integer>
<value> ::= <float>

How can I transform the internal representation of Mathematica's Classifiers into this representation?

Notes:

  • MATLAB provides libsvmread to import svms.
  • In python sklearn.datasets.load_svmlight_file imports svms.
  • Libsvm uses the so called "sparse" format where zero values do not need to be stored.

Under the hood Mathematica uses libsvm, so I don't think this question is beyond the pale.

I need to export an svm I trained with Classify to the standard SVM Format (which is readable by libsvm).

The SVM format obeys the following Backus-Naur Form (see http://www.cs.cornell.edu/People/tj/svm_light/), it looks like this:

<line> ::= <target> " " (<feature> ":" <value>)+
<target> ::= <positive-integer>
<feature> ::= <positive-integer>
<value> ::= <float>

How can I transform the internal representation of Mathematica's Classifiers into this representation?

Notes:

  • MATLAB provides libsvmread to import svms.
  • In python sklearn.datasets.load_svmlight_file imports svms.
  • Libsvm uses the so called "sparse" format where zero values do not need to be stored.
Source Link
M.R.
  • 31.8k
  • 8
  • 96
  • 289

How to import/export to libsvm?

I need to export an svm I trained with Classify to the standard SVM Format (which is readable by libsvm).

The SVM format obeys the following Backus-Naur Form (see http://www.cs.cornell.edu/People/tj/svm_light/), it looks like this:

<line> ::= <target> " " (<feature> ":" <value>)+
<target> ::= <positive-integer>
<feature> ::= <positive-integer>
<value> ::= <float>

How can I transform the internal representation of Mathematica's Classifiers into this representation?

Notes:

  • MATLAB provides libsvmread to import svms.
  • In python sklearn.datasets.load_svmlight_file imports svms.
  • Libsvm uses the so called "sparse" format where zero values do not need to be stored.