davidsoergel / jlibsvm Goto Github PK
View Code? Open in Web Editor NEWEfficient training of Support Vector Machines in Java
License: Other
Efficient training of Support Vector Machines in Java
License: Other
In MultiClassificationSVM::trainWithoutScaling
there are parallel tasks spawned using Parallel.forEach . This restults in non-deterministic classification results. Serializing this fixes the problem.
The reason is that somehow the SVMs size is truncated and data is lost. My feeling is that the issue is within KernelQMatrix
.
Hey there,
I've been trying to implement this library and also to use the provided svm_train and svm_predict methods, but it's not working. The training seems to work out, I'm getting model-files in my directory. However, when I try svm_predict with that model file it doesn't work. I also tried to implement the predicting myself, but it seems to break on SolutionModel.identifyTypeAndLoad.
Exception in thread "main" edu.berkeley.compbio.jlibsvm.SvmException: Unable to load file faceSpoofing.data.model
Can someone help me out with this or fix this in the directory? If someone can tell me what's wrong I wouldn't mind fixing it myself and doing a pull request either.
I think the repositories and dependencies you supplied are no longer working.
Hi developers,
I am trying to run jlibsvm using the legacyexec programs svm_train and svm_predict. I have successfully run svm_train and produced a model file. Then, I provided this model file as the second attribute of svm_predict, but I get the following error.
Exception in thread "main" edu.berkeley.compbio.jlibsvm.SvmException: Unable to load file models/a2a.m
at edu.berkeley.compbio.jlibsvm.SolutionModel.identifyTypeAndLoad(SolutionModel.java:69)
at svm_predict.main(svm_predict.java:47)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at edu.berkeley.compbio.jlibsvm.SolutionModel.identifyTypeAndLoad(SolutionModel.java:59)
... 1 more
Caused by: java.lang.NullPointerException
at java.util.StringTokenizer.(StringTokenizer.java:199)
at java.util.StringTokenizer.(StringTokenizer.java:236)
at edu.berkeley.compbio.jlibsvm.binary.BinaryModel.(BinaryModel.java:133)
... 6 more
I think the problem lies in BinaryModel. I have tried versions 0.91 and 0.92, but I get the same error. I have also inspected the model file that is produced by svm_train and it seems perfectly logical.
Thanks in advance for your reply!
Yannis
Generate a table showing time, memory usage, and cross-validation accuracy for different data sets using all three packages.
Need to think about relationship between stand-alone jsvmlib and version integrated with edu.berkeley.compbio.ml, which has lots more dependencies etc.
There are currently two mostly redundant implementations in svm_train and BinaryClassificationSVM (where it's used for probability estimates)
Heya, thanks for doing the refactor work on libsvm! It'll come in handy for my project. I thought I'd post up the gradle equivalent of your pom repo declarations for others' use -- including your thirdparty repo which was required.
dependencies {
// http://dev.davidsoergel.com/nexus/content/repositories/releases
compile group: 'edu.berkeley.compbio', name: 'jlibsvm', version: '0.911'
}
repositories {
jcenter()
mavenCentral()
maven {
url 'http://davidsoergel.com/nexus/content/repositories/releases'
}
maven {
url 'http://davidsoergel.com/nexus/content/repositories/thirdparty'
}
}
Hello,
I am trying to understand how jlibsvm works.
From the source code, I understand that L refers to label (e.g. of type String
), while P refers to the feature vector for a particular data point. A collection of data points makes up a problem set.
A problem will be fed into an SVM classifier, to generate a model via train()
.
However, I am unclear since P
can be any object (instead of an array of floats, for e.g.), how are comparisons made? Should there be some sort of comparable
interface for each specified in this class?
Great library, by the way!
The following is the trace of the error:
Exception in thread "main" sun.reflect.generics.reflectiveObjects.NotImplementedException
at edu.berkeley.compbio.jlibsvm.SolutionModel.writeToStream(SolutionModel.java:109)
at edu.berkeley.compbio.jlibsvm.binary.AlphaModel.writeToStream(AlphaModel.java:140)
at edu.berkeley.compbio.jlibsvm.binary.BinaryModel.writeToStream(BinaryModel.java:287)
at edu.berkeley.compbio.jlibsvm.SolutionModel.save(SolutionModel.java:96)
at Trainer.run(Trainer.java:66)
at detectSpoof.main(detectSpoof.java:67)
Any help or a fix would be much appreciated.
Jar version used: 0.9
Using the legacyexec svm_train command with the next command :
... edu.berkeley.compbio.jlibsvm.legacyexec.svm_train -c 100000 -w0 0.427 -w1 0.012
and a set of scores (see attached file labels.txt) I have obtained the next log error line as an outcome:
2010-12-10 11:27:21,771 [main] ERROR edu.berkeley.compbio.jlibsvm.Solver - Solver reached maximum iterations, aborting
The equivalent call to the LIBSVM's train command does not give me any error. LIBSVM version I am using is 2.91
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.