View Full Version : BVDecompose for numerical classes

06-19-2008, 01:38 PM
Hi, I've got a quick question. I've been trying to change the code for BVDecompose (and BVDecomposeSubCVSeg) in order to get it to automatically change to a quadratic loss function instead of the zero-one loss function, whenever it encounters data sets with numerical classes.

So, I tracked down the java files, and made some changes to the code, but how could i run the altered code? Do I have to recompile a new weka.jar? Or could I test it from the command line within WEKA?

I'm on an Intel Mac (Leopard 10.5.3), running WEKA 3.5.7 .

06-19-2008, 05:30 PM

That sounds like a pretty useful change! If it all works as expected, would you consider contributing it back to Weka?

As for your question, you don't necessarily need to create a new executable weka.jar file. You can set your CLASSPATH to point to the directory that contains the source of Weka and then compile all the classes therein. You can run BVDecompose from the command line with:

java weka.classifiers.BVDecompose -h

This will display all the command line options available.

If you are interested in contributing to Weka, then I'd suggest checking out the current HEAD of weka from the CVS repository and making your changes to there. Mac OSX has cvs and instructions for checking out can be found here:


When you check out Weka, it includes a handy ant build script for compiling weka, making executable jar files, generating the javadoc etc.


06-20-2008, 02:56 AM
Thanks, Mark.

I have no experience with cvs and couldn't get it to work. I'm under time constraints so i'm afraid i have to skip altering the code. For now...