5.0

5.0 | 3 ratings Rate this file 47 Downloads (last 30 days) File Size: 1.56 KB File ID: #19260

Using Weka in Matlab

by Muhammad Shoaib Sehgal

 

18 Mar 2008 (Updated 07 Apr 2008)

Example file how to use weka (written in Java) in Matlab

| Watch this File

File Information
Description

The file demonstrates interfacing Java with Matlab by using weka (Machine learning software, written in JAVA) as an example.

MATLAB release MATLAB 7.2 (R2006a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (6)
19 Mar 2008 Jorge Diaz-Ramirez

Excellent file..
Thank

26 Aug 2009 Daria Skripko

Hi Muhammad, I find this very usful for me.
But if I run this example in Matlab I've got the following error:

-----------------------------------------------------
 ??? Java exception occurred:
java.lang.Exception:
Weka exception: No source has been specified

General options:

-h or -help
Output help information.
-synopsis or -info
Output synopsis for classifier (use in conjunction with -h)
-t <name of training file>
Sets training file.
-T <name of test file>
....
-E weka.classifiers.bayes.net.estimate.SimpleEstimator
Estimator algorithm

at weka.classifiers.Evaluation.evaluateModel(Unknown Source)

Error in ==> weka_example at 22
Evaluation.evaluateModel(javaObject('weka.classifiers.bayes.BayesNet'),prm);

------------------------------------------------------------------

Could you please help me?

Daria

26 Aug 2009 Daria Skripko  
26 Aug 2009 Daria Skripko

That's great!

26 Aug 2009 Muhammad Shoaib Sehgal

Here are some leads which might be helpful

1- From the error it seems the arff files are not available at:

v2 = java.lang.String('WEKA_HOME\trainData.arff');
v4 = java.lang.String('WEKA_HOME\testDATA.arff');

Can you check them and share what you are using Weka_Home?

2- Jut to be clear you are using it on windows? and for Mac/Unix you'd need to use / instead of \ to specify the path.

3- It seems some versions of weka are case sensitive so just make sure you use the same case (lower case) for the file extension.

https://list.scms.waikato.ac.nz/pipermail/wekalist/2008-August/014326.html

01 Apr 2010 Muhammad Shoaib Sehgal

Thanks for using it. If you'd like to contact me. My active email can be obtained from:

http://shoaibs.wordpress.com/

Please login to add a comment or rating.
Updates
24 Mar 2008

Description update

07 Apr 2008

update description

Tag Activity for this File
Tag Applied By Date/Time
external interface Muhammad Shoaib Sehgal 22 Oct 2008 09:54:12
weka Muhammad Shoaib Sehgal 22 Oct 2008 09:54:12
java Muhammad Shoaib Sehgal 22 Oct 2008 09:54:12
external code interfacing Muhammad Shoaib Sehgal 22 Oct 2008 09:54:12
machine learning Muhammad Shoaib Sehgal 22 Oct 2008 09:54:12
external code interfacing Kashif Naveed 26 Jun 2009 05:52:55

Contact us at files@mathworks.com