WEKA doesn't runs LinearRegression

classic Classic list List threaded Threaded
8 messages Options
JC
Reply | Threaded
Open this post in threaded view
|

WEKA doesn't runs LinearRegression

JC
This post was updated on .
Hi all and thanks to read me.

Seven months ago I started to work with WEKA. All was working fine but now I
can't use some algorithms.
For example, SimpleKMeans works fine but LinearRegression is impossible be
ran.

I am working with Eclipse IDE using Java and there I do calls to WEKA like
this:

String command = "java -classpath
$CLASSPATH:/home/student/Escritorio/Programas/weka-3-8-3/weka.jar
weka.clusterers.SimpleKMeans -N 5 -t " + rutaFuente + "*.arff";

But the call to LinearRegression doesn't work and few months ago this call
worked fine.

String command = "java -classpath $CLASSPATH:/home/jromeroaj/Escritorio/Programas/weka-3-8-3/weka.jar weka.classifiers.functions.LinearRegression -S 0 -R 1.0E-8 -num-decimal-places 4 " + path;

(path is a variable which has the destination where the file .arff will be generated)

What could be happening?

I let you the CSV where I am reading the data too.  dataWeka.csv
<http://weka.8497.n7.nabble.com/file/t6747/dataWeka.csv

Thank you in advance :) !!!



--
Sent from: http://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list
Send posts to: Wekalist@list.waikato.ac.nz
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: WEKA doesn't runs LinearRegression

Eibe Frank-2
Administrator
Some of the options in your string are not understood by LinearRegression. Perhaps you were using a modified version.

> " -F BPMavg -L 1 -M 2 -G EDAmin -prime 2

aren’t options for LinearRegression.

Cheers,
Eibe

> On 30/01/2019, at 10:14 PM, JC <[hidden email]> wrote:
>
> Hi all and thanks to read me.
>
> Seven months ago I started to work with WEKA. All was working fine but now I
> can't use some algorithms.
> For example, SimpleKMeans works fine but LinearRegression is impossible be
> ran.
>
> I am working with Eclipse IDE using Java and there I do calls to WEKA like
> this:
>
> /String command = "java -classpath
> $CLASSPATH:/home/student/Escritorio/Programas/weka-3-8-3/weka.jar
> weka.clusterers.SimpleKMeans -N 5 -t " + rutaFuente + "*.arff";/
>
> But the call to LinearRegression doesn't work and few months ago this call
> worked fine.
>
> String command = "java -classpath
> $CLASSPATH:/home/student/Escritorio/Programas/weka-3-8-3/weka.jar
> weka.classifiers.functions.LinearRegression -S 0 -R 1.0E-8
> -num-decimal-places 4 -t " +rutaFuente + " -F BPMavg -L 1 -M 2 -G EDAmin
> -prime 2";
>
> What could be happening?
>
> I let you the CSV where I am reading the data too.  dataWeka.csv
> <http://weka.8497.n7.nabble.com/file/t6747/dataWeka.csv>  
>
> Thank you in advance!
>
>
>
> --
> Sent from: http://weka.8497.n7.nabble.com/
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
JC
Reply | Threaded
Open this post in threaded view
|

Re: WEKA doesn't runs LinearRegression

JC
Thank you Eibe to try to help me

My apologies. The call what I am doing to use Linear Regression is this
(Post edited):

String command = "java -classpath
$CLASSPATH:/home/jromeroaj/Escritorio/Programas/weka-3-8-3/weka.jar
weka.classifiers.functions.LinearRegression -S 0 -R 1.0E-8
-num-decimal-places 4 " + path;

(path is a variable which has the destination where the file .arff will be
generated)

I am getting this call from the log when I execute this algorithm in the
programm and there all works fine but when I am trying to use in my eclipse
project doesn't works.

Thank you in advance again.




--
Sent from: http://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: WEKA doesn't runs LinearRegression

Eibe Frank-3
I can't see any obvious problem. Can you perhaps post the error message (including the stack trace) you are getting?

Cheers,
Eibe

On Thu, Jan 31, 2019 at 7:47 PM JC <[hidden email]> wrote:
Thank you Eibe to try to help me

My apologies. The call what I am doing to use Linear Regression is this
(Post edited):

String command = "java -classpath
$CLASSPATH:/home/jromeroaj/Escritorio/Programas/weka-3-8-3/weka.jar
weka.classifiers.functions.LinearRegression -S 0 -R 1.0E-8
-num-decimal-places 4 " + path;

(path is a variable which has the destination where the file .arff will be
generated)

I am getting this call from the log when I execute this algorithm in the
programm and there all works fine but when I am trying to use in my eclipse
project doesn't works.

Thank you in advance again.




--
Sent from: http://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
JC
Reply | Threaded
Open this post in threaded view
|

Re: WEKA doesn't runs LinearRegression

JC
This post was updated on .
Yes, of course!

This is the call, now I'm trying in terminal so the call is this:

java -classpath
$CLASSPATH:/home/student/Escritorio/Programas/weka-3-8-3/weka.jar
weka.classifiers.functions.LinearRegression -S 0 -R 1.0E-8
-num-decimal-places 5 -t
/home/student/Escritorio/Programas/HUPAdatos/PRUEBAS/*.arff

and I get this error:

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: no/uib/cipr/matrix/Matrix
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
	at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
	at java.lang.Class.getMethod0(Class.java:3018)
	at java.lang.Class.getMethod(Class.java:1784)
	at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: no.uib.cipr.matrix.Matrix
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 7 more

I let here again the CSV  xd.csv
<http://weka.8497.n7.nabble.com/file/t6747/xd.csv

If it is necessary something more, just tell it me!
Thank you again Eibe!!



--
Sent from: http://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list
Send posts to: Wekalist@list.waikato.ac.nz
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: WEKA doesn't runs LinearRegression

Eibe Frank-2
Administrator
It looks like you forgot to copy and paste the error message (including the stack trace)?

Your command-line works fine for me on the .csv data you sent. However, it looks like you actually applied it to an ARFF file?

Cheers,
Eibe

> On 31/01/2019, at 9:36 PM, JC <[hidden email]> wrote:
>
> Yes, of course!
>
> This is the call, now I'm trying in terminal so the call is this:
>
> java -classpath
> $CLASSPATH:/home/student/Escritorio/Programas/weka-3-8-3/weka.jar
> weka.classifiers.functions.LinearRegression -S 0 -R 1.0E-8
> -num-decimal-places 5 -t
> /home/student/Escritorio/Programas/HUPAdatos/PRUEBAS/*.arff
>
> and I get this error:
>
>
>
> I let here again the CSV  xd.csv
> <http://weka.8497.n7.nabble.com/file/t6747/xd.csv>  
>
> If it is necessary something more, just tell it me!
> Thank you again Eibe!
>
>
>
> --
> Sent from: http://weka.8497.n7.nabble.com/
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
JC
Reply | Threaded
Open this post in threaded view
|

Re: WEKA doesn't runs LinearRegression

JC
Thank you Eibe for your help and excuse me because I couldn't response
before.

I edited the message with the error. Can't you see it? Anyway I leave here
the error:

*Error: A JNI error has occurred, please check your installation and try
again
Exception in thread "main" java.lang.NoClassDefFoundError:
no/uib/cipr/matrix/Matrix*



Thank you in advance :)





--
Sent from: http://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: WEKA doesn't runs LinearRegression

Eibe Frank-2
Administrator
The MTJ .jar files need to be in your CLASSPATH. WEKA has been using MTJ for a while now, for faster linear algebra.

The .jar files are included in the weka.jar file but if you use Eclipse, IntelliJ, etc., you need to extract them out of the weka.jar file (using unzip or the jar utility) and put them into your project CLASSPATH.

Cheers,
Eibe

> On 4/02/2019, at 8:09 PM, JC <[hidden email]> wrote:
>
> Thank you Eibe for your help and excuse me because I couldn't response
> before.
>
> I edited the message with the error. Can't you see it? Anyway I leave here
> the error:
>
> *Error: A JNI error has occurred, please check your installation and try
> again
> Exception in thread "main" java.lang.NoClassDefFoundError:
> no/uib/cipr/matrix/Matrix*
>
>
>
> Thank you in advance :)
>
>
>
>
>
> --
> Sent from: http://weka.8497.n7.nabble.com/
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html