Eranga Perera
Eranga Perera

Reputation: 938

Is it possible to run python libsvm in Android?

I'm developing accelerometer pattern recognition application in android.

Questions

Upvotes: 1

Views: 642

Answers (2)

carlosdc
carlosdc

Reputation: 12152

I don't think you need to run libsvm inside Android (unless you want to train on Android). If you want to predict in Android, all you need to do is implement the classification equation in Android. This is five lines of code.

Look at this question: Using libsvm into java code to perform prediction in a mobile device

Upvotes: 2

Pedrom
Pedrom

Reputation: 3823

I am not aware of an easy way to run the python wrapper of libsvm on Android (other than embed python in a C library but that is an overkill). However, I think it would be easier if you access libsvm directly from the C implementation.

Here is a question that address how to compile native code on Android:

How do I compile simple native code using Android.mk?

Another way to make it work is to use the Java implementation which is available from the original distribution:

http://www.csie.ntu.edu.tw/~cjlin/libsvm/#java

Also there is an alternative Java implementation which seems to be faster than the official java distribution http://dev.davidsoergel.com/trac/jlibsvm/

Hope it helps.

Upvotes: 2

Related Questions