In my svm-clj library I read and write the LibSVM model in a text
format that LibSVM's C library also understands. That's a sparse
text file you could also store in Mongo. Use or take a look at:

https://github.com/r0man/svm-clj/blob/master/src/svm/core.clj#L125

Roman


On Monday, February 24, 2014 8:36:21 PM UTC+1, Goldritter wrote:
>
> Hi,
>
> I wanted to use the Java library of the libsvm (
> http://www.csie.ntu.edu.tw/~cjlin/libsvm/) jlibsvm (
> http://dev.davidsoergel.com/trac/jlibsvm/) to learn a Support Vector 
> Machine and then store the learned model into a MongoDB (used kernel, 
> support vectors, alphas, label(s), rho, ...). 
>
> A way to train the SVM has been described here
> http://lilyx.net/2011/07/02/using-svm-support-vector-machine-from-clojure/
> and so far it works.
>
> The main problem I have now is to store the model. The supportvectors and 
> the alphas are all arrays (the supportvectors are an array of 
> SparseVectors). 
> And I have no clue how to transform these arrays into a list, map or other 
> clojure data structure.
>
> Does somebody has an idea how to to this in a clojure way or have I to go 
> over Java to transform the array in a Java List and then use this List to 
> create the needed datastructure?
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to