Quantcast

Request help to run Principal Components from terminal

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Request help to run Principal Components from terminal

Waldo Paz Rodriguez
Hi Suhas Srinivasan,

I had to do the same procedure that you, for that, I recommend to you the following things:

-export an environment variable with the path to java(normally should be in /usr/share/java, not include the folder with just the path to java), and then path to weka jar(this have to be in the path), an example:
   export CLASSPATH=$CLASSPATH:</path/to/java>:</path/to/weka.jar>

-then you need add the parameter -cp in your command to execute PCA algorithm, like this:
   java -cp CLASSPATH and the rest of the command

I hope this help you.

Cheers, 
Waldo

2017-02-16 8:57 GMT-05:00 <[hidden email]>:
Send Wekalist mailing list submissions to
        [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
        https://list.waikato.ac.nz/mailman/listinfo/wekalist
or, via email, send a message with subject or body 'help' to
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Wekalist digest..."


Today's Topics:

   1. Request help to run Principal Components from terminal
      (Srinivasan, Suhas)
   2. Re: Request help to run Principal Components from terminal
      (Eibe Frank)
   3. FW: Request help to run Principal Components      from    terminal
      (Srinivasan, Suhas)


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

Message: 1
Date: Thu, 16 Feb 2017 00:56:26 +0000
From: "Srinivasan, Suhas" <[hidden email]>
To: "[hidden email]" <[hidden email]>
Subject: [Wekalist] Request help to run Principal Components from
        terminal
Message-ID:
        <[hidden email]>

Content-Type: text/plain; charset="us-ascii"

Hi,

I have a large dataset and due to the memory requirements I have to run the Principal Components attribute selection on a linux server.
But I don't know the proper command to run this from the terminal. Searching online yielded no results. Any help would be greatly appreciated.
I have tested the below two commands got from the GUI logs. The classpath has been set in the environment and giving it as a command option did not help.
Java 64 bit 1.8.0_121 and Weka 3.9.1.

java -Xmx100g weka.attributeSelection.PrincipalComponents -i <input_file> -s "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" -R 0.95 -A 5 > <output_file>
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:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)


java -Xmx100g weka.filters.supervised.attribute.AttributeSelection -i <input_file> -E "weka.attributeSelection.PrincipalComponents -R 0.95 -A 5" -S "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" > <output_file>
Exception in thread "main" java.lang.NoClassDefFoundError: no/uib/cipr/matrix/Matrix
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:198)
        at weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:178)
        at weka.core.WekaPackageClassLoaderManager.objectForName(WekaPackageClassLoaderManager.java:162)
        at weka.Run.findSchemeMatch(Run.java:90)
        at weka.core.Utils.forName(Utils.java:1114)
        at weka.attributeSelection.ASEvaluation.forName(ASEvaluation.java:125)
        at weka.filters.supervised.attribute.AttributeSelection.setOptions(AttributeSelection.java:294)
        at weka.filters.Filter.filterFile(Filter.java:1054)
        at weka.filters.Filter.runFilter(Filter.java:1411)
        at weka.filters.supervised.attribute.AttributeSelection.main(AttributeSelection.java:614)
Caused by: java.lang.ClassNotFoundException: no.uib.cipr.matrix.Matrix
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)



Kind regards,
Suhas Srinivasan



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

Message: 2
Date: Thu, 16 Feb 2017 20:56:32 +1300
From: Eibe Frank <[hidden email]>
To: "Weka machine learning workbench list."
        <[hidden email]>
Subject: Re: [Wekalist] Request help to run Principal Components from
        terminal
Message-ID:
        <CADehzLU+Cmtr4SWUTe+NjTn2sAOOt+bPTdXpPbO6XkvEh4ww=[hidden email]>
Content-Type: text/plain; charset="utf-8"

You may need to use weka.Run so that the MTJ classes are loaded correctly:

  java weka.Run .AttributeSelection -i <input_file> -E
".attributeSelection.PrincipalComponents -R 0.95 -A 5" -S ".Ranker ..."

Cheers,
Eibe

On Thu, Feb 16, 2017 at 1:56 PM, Srinivasan, Suhas <[hidden email]>
wrote:

> Hi,
>
> I have a large dataset and due to the memory requirements I have to run
> the Principal Components attribute selection on a linux server.
> But I don't know the proper command to run this from the terminal.
> Searching online yielded no results. Any help would be greatly appreciated.
> I have tested the below two commands got from the GUI logs. The classpath
> has been set in the environment and giving it as a command option did not
> help.
> Java 64 bit 1.8.0_121 and Weka 3.9.1.
>
> java -Xmx100g weka.attributeSelection.PrincipalComponents -i <input_file>
> -s "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" -R
> 0.95 -A 5 > <output_file>
> 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:381)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>
>
> java -Xmx100g weka.filters.supervised.attribute.AttributeSelection -i
> <input_file> -E "weka.attributeSelection.PrincipalComponents -R 0.95 -A
> 5" -S "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" >
> <output_file>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> no/uib/cipr/matrix/Matrix
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:348)
>         at weka.core.WekaPackageClassLoaderManager.forName(
> WekaPackageClassLoaderManager.java:198)
>         at weka.core.WekaPackageClassLoaderManager.forName(
> WekaPackageClassLoaderManager.java:178)
>         at weka.core.WekaPackageClassLoaderManager.objectForName(
> WekaPackageClassLoaderManager.java:162)
>         at weka.Run.findSchemeMatch(Run.java:90)
>         at weka.core.Utils.forName(Utils.java:1114)
>         at weka.attributeSelection.ASEvaluation.forName(
> ASEvaluation.java:125)
>         at weka.filters.supervised.attribute.AttributeSelection.
> setOptions(AttributeSelection.java:294)
>         at weka.filters.Filter.filterFile(Filter.java:1054)
>         at weka.filters.Filter.runFilter(Filter.java:1411)
>         at weka.filters.supervised.attribute.AttributeSelection.
> main(AttributeSelection.java:614)
> Caused by: java.lang.ClassNotFoundException: no.uib.cipr.matrix.Matrix
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>
>
>
> Kind regards,
> Suhas Srinivasan
>
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/
> mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~
> ml/weka/mailinglist_etiquette.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.waikato.ac.nz/pipermail/wekalist/attachments/20170216/6236313c/attachment-0001.html>

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

Message: 3
Date: Thu, 16 Feb 2017 13:56:38 +0000
From: "Srinivasan, Suhas" <[hidden email]>
To: Eibe Frank <[hidden email]>,
        "[hidden email]"   <[hidden email]>
Subject: [Wekalist] FW: Request help to run Principal Components        from
        terminal
Message-ID:
        <[hidden email]>

Content-Type: text/plain; charset="utf-8"

Hi Dr. Frank,

Thank you for the reply.
I tried out the below command but I still get an error.

java weka.Run.AttributeSelection -i input.arff -E "weka.attributeSelection.PrincipalComponents -R 0.95 -A 5" -S "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" > output.arff
Error: Could not find or load main class weka.Run.AttributeSelection

Could you please let me know if there is any other command I can try.

Kind regards,
Suhas Srinivasan

From: [hidden email] [mailto:[hidden email]] On Behalf Of Eibe Frank
Sent: Thursday, February 16, 2017 2:57 AM
To: Weka machine learning workbench list. <[hidden email]>
Subject: Re: [Wekalist] Request help to run Principal Components from terminal

You may need to use weka.Run so that the MTJ classes are loaded correctly:
? java weka.Run .AttributeSelection -i <input_file> -E ".attributeSelection.PrincipalComponents -R 0.95 -A 5" -S ".Ranker ..."
Cheers,
Eibe

On Thu, Feb 16, 2017 at 1:56 PM, Srinivasan, Suhas <[hidden email]> wrote:
Hi,

I have a large dataset and due to the memory requirements I have to run the Principal Components attribute selection on a linux server.
But I don't know the proper command to run this from the terminal. Searching online yielded no results. Any help would be greatly appreciated.
I have tested the below two commands got from the GUI logs. The classpath has been set in the environment and giving it as a command option did not help.
Java 64 bit 1.8.0_121 and Weka 3.9.1.

java -Xmx100g weka.attributeSelection.PrincipalComponents -i <input_file> -s "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" -R 0.95 -A 5 > <output_file>
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:381)
? ? ? ? at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
? ? ? ? at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
? ? ? ? at java.lang.ClassLoader.loadClass(ClassLoader.java:357)


java -Xmx100g weka.filters.supervised.attribute.AttributeSelection -i <input_file> -E "weka.attributeSelection.PrincipalComponents -R 0.95 -A 5" -S "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" > <output_file>
Exception in thread "main" java.lang.NoClassDefFoundError: no/uib/cipr/matrix/Matrix
? ? ? ? at java.lang.Class.forName0(Native Method)
? ? ? ? at java.lang.Class.forName(Class.java:348)
? ? ? ? at weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:198)
? ? ? ? at weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:178)
? ? ? ? at weka.core.WekaPackageClassLoaderManager.objectForName(WekaPackageClassLoaderManager.java:162)
? ? ? ? at weka.Run.findSchemeMatch(Run.java:90)
? ? ? ? at weka.core.Utils.forName(Utils.java:1114)
? ? ? ? at weka.attributeSelection.ASEvaluation.forName(ASEvaluation.java:125)
? ? ? ? at weka.filters.supervised.attribute.AttributeSelection.setOptions(AttributeSelection.java:294)
? ? ? ? at weka.filters.Filter.filterFile(Filter.java:1054)
? ? ? ? at weka.filters.Filter.runFilter(Filter.java:1411)
? ? ? ? at weka.filters.supervised.attribute.AttributeSelection.main(AttributeSelection.java:614)
Caused by: java.lang.ClassNotFoundException: no.uib.cipr.matrix.Matrix
? ? ? ? at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
? ? ? ? at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
? ? ? ? at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
? ? ? ? at java.lang.ClassLoader.loadClass(ClassLoader.java:357)



Kind regards,
Suhas Srinivasan

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00001.txt
URL: <http://list.waikato.ac.nz/pipermail/wekalist/attachments/20170216/85ef2667/attachment.txt>

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

_______________________________________________
Wekalist mailing list
[hidden email]
https://list.waikato.ac.nz/mailman/listinfo/wekalist


End of Wekalist Digest, Vol 168, Issue 35
*****************************************


_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: 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
|  
Report Content as Inappropriate

Re: Request help to run Principal Components from terminal

Srinivasan, Suhas

Hi Waldo,

 

Thank you for the reply.

I will definitely try what you have suggested.

But there seem to be multiple variations of this command, could you also point out which particular command to use.

 

Kind regards,

Suhas Srinivasan

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Waldo Paz Rodriguez
Sent: Thursday, February 16, 2017 10:00 AM
To: [hidden email]
Subject: [Wekalist] Request help to run Principal Components from terminal

 

Hi Suhas Srinivasan,

 

I had to do the same procedure that you, for that, I recommend to you the following things:

 

-export an environment variable with the path to java(normally should be in /usr/share/java, not include the folder with just the path to java), and then path to weka jar(this have to be in the path), an example:

   export CLASSPATH=$CLASSPATH:</path/to/java>:</path/to/weka.jar>

 

-then you need add the parameter -cp in your command to execute PCA algorithm, like this:

   java -cp CLASSPATH and the rest of the command

 

I hope this help you.

 

Cheers, 

Waldo

 

2017-02-16 8:57 GMT-05:00 <[hidden email]>:

Send Wekalist mailing list submissions to
        [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
        https://list.waikato.ac.nz/mailman/listinfo/wekalist
or, via email, send a message with subject or body 'help' to
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Wekalist digest..."


Today's Topics:

   1. Request help to run Principal Components from terminal
      (Srinivasan, Suhas)
   2. Re: Request help to run Principal Components from terminal
      (Eibe Frank)
   3. FW: Request help to run Principal Components      from    terminal
      (Srinivasan, Suhas)


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

Message: 1
Date: Thu, 16 Feb 2017 00:56:26 +0000
From: "Srinivasan, Suhas" <[hidden email]>
To: "[hidden email]" <[hidden email]>
Subject: [Wekalist] Request help to run Principal Components from
        terminal
Message-ID:
        <[hidden email]>

Content-Type: text/plain; charset="us-ascii"

Hi,

I have a large dataset and due to the memory requirements I have to run the Principal Components attribute selection on a linux server.
But I don't know the proper command to run this from the terminal. Searching online yielded no results. Any help would be greatly appreciated.
I have tested the below two commands got from the GUI logs. The classpath has been set in the environment and giving it as a command option did not help.
Java 64 bit 1.8.0_121 and Weka 3.9.1.

java -Xmx100g weka.attributeSelection.PrincipalComponents -i <input_file> -s "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" -R 0.95 -A 5 > <output_file>
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:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)


java -Xmx100g weka.filters.supervised.attribute.AttributeSelection -i <input_file> -E "weka.attributeSelection.PrincipalComponents -R 0.95 -A 5" -S "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" > <output_file>
Exception in thread "main" java.lang.NoClassDefFoundError: no/uib/cipr/matrix/Matrix
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:198)
        at weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:178)
        at weka.core.WekaPackageClassLoaderManager.objectForName(WekaPackageClassLoaderManager.java:162)
        at weka.Run.findSchemeMatch(Run.java:90)
        at weka.core.Utils.forName(Utils.java:1114)
        at weka.attributeSelection.ASEvaluation.forName(ASEvaluation.java:125)
        at weka.filters.supervised.attribute.AttributeSelection.setOptions(AttributeSelection.java:294)
        at weka.filters.Filter.filterFile(Filter.java:1054)
        at weka.filters.Filter.runFilter(Filter.java:1411)
        at weka.filters.supervised.attribute.AttributeSelection.main(AttributeSelection.java:614)
Caused by: java.lang.ClassNotFoundException: no.uib.cipr.matrix.Matrix
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)



Kind regards,
Suhas Srinivasan



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

Message: 2
Date: Thu, 16 Feb 2017 20:56:32 +1300
From: Eibe Frank <[hidden email]>
To: "Weka machine learning workbench list."
        <[hidden email]>
Subject: Re: [Wekalist] Request help to run Principal Components from
        terminal
Message-ID:
        <CADehzLU+Cmtr4SWUTe+NjTn2sAOOt+bPTdXpPbO6XkvEh4ww=[hidden email]>
Content-Type: text/plain; charset="utf-8"

You may need to use weka.Run so that the MTJ classes are loaded correctly:

  java weka.Run .AttributeSelection -i <input_file> -E
".attributeSelection.PrincipalComponents -R 0.95 -A 5" -S ".Ranker ..."

Cheers,
Eibe

On Thu, Feb 16, 2017 at 1:56 PM, Srinivasan, Suhas <[hidden email]>
wrote:

> Hi,
>
> I have a large dataset and due to the memory requirements I have to run
> the Principal Components attribute selection on a linux server.
> But I don't know the proper command to run this from the terminal.
> Searching online yielded no results. Any help would be greatly appreciated.
> I have tested the below two commands got from the GUI logs. The classpath
> has been set in the environment and giving it as a command option did not
> help.
> Java 64 bit 1.8.0_121 and Weka 3.9.1.
>
> java -Xmx100g weka.attributeSelection.PrincipalComponents -i <input_file>
> -s "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" -R
> 0.95 -A 5 > <output_file>
> 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:381)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>
>
> java -Xmx100g weka.filters.supervised.attribute.AttributeSelection -i
> <input_file> -E "weka.attributeSelection.PrincipalComponents -R 0.95 -A
> 5" -S "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" >
> <output_file>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> no/uib/cipr/matrix/Matrix
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:348)
>         at weka.core.WekaPackageClassLoaderManager.forName(
> WekaPackageClassLoaderManager.java:198)
>         at weka.core.WekaPackageClassLoaderManager.forName(
> WekaPackageClassLoaderManager.java:178)
>         at weka.core.WekaPackageClassLoaderManager.objectForName(
> WekaPackageClassLoaderManager.java:162)
>         at weka.Run.findSchemeMatch(Run.java:90)
>         at weka.core.Utils.forName(Utils.java:1114)
>         at weka.attributeSelection.ASEvaluation.forName(
> ASEvaluation.java:125)
>         at weka.filters.supervised.attribute.AttributeSelection.
> setOptions(AttributeSelection.java:294)
>         at weka.filters.Filter.filterFile(Filter.java:1054)
>         at weka.filters.Filter.runFilter(Filter.java:1411)
>         at weka.filters.supervised.attribute.AttributeSelection.
> main(AttributeSelection.java:614)
> Caused by: java.lang.ClassNotFoundException: no.uib.cipr.matrix.Matrix
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>
>
>
> Kind regards,
> Suhas Srinivasan
>
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/
> mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~
> ml/weka/mailinglist_etiquette.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.waikato.ac.nz/pipermail/wekalist/attachments/20170216/6236313c/attachment-0001.html>

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

Message: 3
Date: Thu, 16 Feb 2017 13:56:38 +0000
From: "Srinivasan, Suhas" <[hidden email]>
To: Eibe Frank <[hidden email]>,
        "[hidden email]"   <[hidden email]>
Subject: [Wekalist] FW: Request help to run Principal Components        from
        terminal
Message-ID:
        <[hidden email]>

Content-Type: text/plain; charset="utf-8"

Hi Dr. Frank,

Thank you for the reply.
I tried out the below command but I still get an error.

java weka.Run.AttributeSelection -i input.arff -E "weka.attributeSelection.PrincipalComponents -R 0.95 -A 5" -S "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" > output.arff
Error: Could not find or load main class weka.Run.AttributeSelection

Could you please let me know if there is any other command I can try.

Kind regards,
Suhas Srinivasan

From: [hidden email] [mailto:[hidden email]] On Behalf Of Eibe Frank
Sent: Thursday, February 16, 2017 2:57 AM
To: Weka machine learning workbench list. <[hidden email]>
Subject: Re: [Wekalist] Request help to run Principal Components from terminal

You may need to use weka.Run so that the MTJ classes are loaded correctly:
? java weka.Run .AttributeSelection -i <input_file> -E ".attributeSelection.PrincipalComponents -R 0.95 -A 5" -S ".Ranker ..."
Cheers,
Eibe

On Thu, Feb 16, 2017 at 1:56 PM, Srinivasan, Suhas <[hidden email]> wrote:
Hi,

I have a large dataset and due to the memory requirements I have to run the Principal Components attribute selection on a linux server.
But I don't know the proper command to run this from the terminal. Searching online yielded no results. Any help would be greatly appreciated.
I have tested the below two commands got from the GUI logs. The classpath has been set in the environment and giving it as a command option did not help.
Java 64 bit 1.8.0_121 and Weka 3.9.1.

java -Xmx100g weka.attributeSelection.PrincipalComponents -i <input_file> -s "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" -R 0.95 -A 5 > <output_file>
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:381)
? ? ? ? at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
? ? ? ? at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
? ? ? ? at java.lang.ClassLoader.loadClass(ClassLoader.java:357)


java -Xmx100g weka.filters.supervised.attribute.AttributeSelection -i <input_file> -E "weka.attributeSelection.PrincipalComponents -R 0.95 -A 5" -S "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" > <output_file>
Exception in thread "main" java.lang.NoClassDefFoundError: no/uib/cipr/matrix/Matrix
? ? ? ? at java.lang.Class.forName0(Native Method)
? ? ? ? at java.lang.Class.forName(Class.java:348)
? ? ? ? at weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:198)
? ? ? ? at weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:178)
? ? ? ? at weka.core.WekaPackageClassLoaderManager.objectForName(WekaPackageClassLoaderManager.java:162)
? ? ? ? at weka.Run.findSchemeMatch(Run.java:90)
? ? ? ? at weka.core.Utils.forName(Utils.java:1114)
? ? ? ? at weka.attributeSelection.ASEvaluation.forName(ASEvaluation.java:125)
? ? ? ? at weka.filters.supervised.attribute.AttributeSelection.setOptions(AttributeSelection.java:294)
? ? ? ? at weka.filters.Filter.filterFile(Filter.java:1054)
? ? ? ? at weka.filters.Filter.runFilter(Filter.java:1411)
? ? ? ? at weka.filters.supervised.attribute.AttributeSelection.main(AttributeSelection.java:614)
Caused by: java.lang.ClassNotFoundException: no.uib.cipr.matrix.Matrix
? ? ? ? at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
? ? ? ? at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
? ? ? ? at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
? ? ? ? at java.lang.ClassLoader.loadClass(ClassLoader.java:357)



Kind regards,
Suhas Srinivasan

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00001.txt
URL: <http://list.waikato.ac.nz/pipermail/wekalist/attachments/20170216/85ef2667/attachment.txt>

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

_______________________________________________
Wekalist mailing list
[hidden email]
https://list.waikato.ac.nz/mailman/listinfo/wekalist


End of Wekalist Digest, Vol 168, Issue 35
*****************************************

 


_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: 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
|  
Report Content as Inappropriate

Re: Request help to run Principal Components from terminal

Srinivasan, Suhas

Hi Waldo,

 

Thank you for the reply. But it still does not work.

Just to let you know I am using Oracle Java 64bit 1.8.0_121 and Weka 3.9.1.

Below is the output of what I tested now.

 

$ which java

/usr/bin/java

$ whereis java

java: /usr/bin/java /usr/share/java /usr/share/man/man1/java.1.gz

$ export CLASSPATH=$CLASSPATH:/usr/share/java:/home/ssrinivasan/weka-3-9-1/weka.jar

$ echo $CLASSPATH

:/usr/share/java:/home/ssrinivasan/weka-3-9-1/weka.jar

 

$ java -cp $CLASSPATH weka.core.SystemInfo

awt.toolkit: sun.awt.X11.XToolkit

file.encoding: UTF-8

file.encoding.pkg: sun.io

file.separator: /

java.awt.graphicsenv: sun.awt.X11GraphicsEnvironment

java.awt.printerjob: sun.print.PSPrinterJob

java.class.path: :/usr/share/java:/home/ssrinivasan/weka-3-9-1/weka.jar

java.class.version: 52.0

….

 

$ java -cp $CLASSPATH -Xmx100g weka.filters.supervised.attribute.AttributeSelection -i input.arff -E "weka.attributeSelection.PrincipalComponents -R 0.95 -A 5" -S "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" > output.arff

Exception in thread "main" java.lang.NoClassDefFoundError: no/uib/cipr/matrix/Matrix

        at java.lang.Class.forName0(Native Method)

        at java.lang.Class.forName(Class.java:348)

        at weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:198)

        at weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:178)

        at weka.core.WekaPackageClassLoaderManager.objectForName(WekaPackageClassLoaderManager.java:162)

        at weka.Run.findSchemeMatch(Run.java:90)

        at weka.core.Utils.forName(Utils.java:1114)

        at weka.attributeSelection.ASEvaluation.forName(ASEvaluation.java:125)

        at weka.filters.supervised.attribute.AttributeSelection.setOptions(AttributeSelection.java:294)

        at weka.filters.Filter.filterFile(Filter.java:1054)

        at weka.filters.Filter.runFilter(Filter.java:1411)

        at weka.filters.supervised.attribute.AttributeSelection.main(AttributeSelection.java:614)

Caused by: java.lang.ClassNotFoundException: no.uib.cipr.matrix.Matrix

        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

 

Kind regards,

Suhas Srinivasan

 

From: Waldo Paz Rodriguez [mailto:[hidden email]]
Sent: Thursday, February 16, 2017 10:32 AM
To: Srinivasan, Suhas <[hidden email]>
Subject: Re: [Wekalist] Request help to run Principal Components from terminal

 

Hi Suhas Srinivasan,

I send an example, but first you must create the environment variables as I explained in the previous mail, you command look like this:

 

   export CLASSPATH=$CLASSPATH:/usr/share/java:/path/to/weka.jar

 

To check that everything is right, I think you can run a simple test:

 

   java -cp $CLASSPATH weka.core.SystemInfo

 

This print information about the system, version of java, etc.

 

   java -cp $CLASSPATH -Xmx2048m weka.filters.supervised.attribute.AttributeSelection -i <input_file> -E "weka.attributeSelection.PrincipalComponents -R 0.95 -A 5" -S "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" > <output_file>

 

Cheers,

Waldo

 

2017-02-16 10:04 GMT-05:00 Srinivasan, Suhas <[hidden email]>:

Hi Waldo,

 

Thank you for the reply.

I will definitely try what you have suggested.

But there seem to be multiple variations of this command, could you also point out which particular command to use.

 

Kind regards,

Suhas Srinivasan

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Waldo Paz Rodriguez
Sent: Thursday, February 16, 2017 10:00 AM
To: [hidden email]


Subject: [Wekalist] Request help to run Principal Components from terminal

 

Hi Suhas Srinivasan,

 

I had to do the same procedure that you, for that, I recommend to you the following things:

 

-export an environment variable with the path to java(normally should be in /usr/share/java, not include the folder with just the path to java), and then path to weka jar(this have to be in the path), an example:

   export CLASSPATH=$CLASSPATH:</path/to/java>:</path/to/weka.jar>

 

-then you need add the parameter -cp in your command to execute PCA algorithm, like this:

   java -cp CLASSPATH and the rest of the command

 

I hope this help you.

 

Cheers, 

Waldo

 

2017-02-16 8:57 GMT-05:00 <[hidden email]>:

Send Wekalist mailing list submissions to
        [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
        https://list.waikato.ac.nz/mailman/listinfo/wekalist
or, via email, send a message with subject or body 'help' to
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Wekalist digest..."


Today's Topics:

   1. Request help to run Principal Components from terminal
      (Srinivasan, Suhas)
   2. Re: Request help to run Principal Components from terminal
      (Eibe Frank)
   3. FW: Request help to run Principal Components      from    terminal
      (Srinivasan, Suhas)


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

Message: 1
Date: Thu, 16 Feb 2017 00:56:26 +0000
From: "Srinivasan, Suhas" <[hidden email]>
To: "[hidden email]" <[hidden email]>
Subject: [Wekalist] Request help to run Principal Components from
        terminal
Message-ID:
        <[hidden email]>

Content-Type: text/plain; charset="us-ascii"

Hi,

I have a large dataset and due to the memory requirements I have to run the Principal Components attribute selection on a linux server.
But I don't know the proper command to run this from the terminal. Searching online yielded no results. Any help would be greatly appreciated.
I have tested the below two commands got from the GUI logs. The classpath has been set in the environment and giving it as a command option did not help.
Java 64 bit 1.8.0_121 and Weka 3.9.1.

java -Xmx100g weka.attributeSelection.PrincipalComponents -i <input_file> -s "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" -R 0.95 -A 5 > <output_file>
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:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)


java -Xmx100g weka.filters.supervised.attribute.AttributeSelection -i <input_file> -E "weka.attributeSelection.PrincipalComponents -R 0.95 -A 5" -S "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" > <output_file>
Exception in thread "main" java.lang.NoClassDefFoundError: no/uib/cipr/matrix/Matrix
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:198)
        at weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:178)
        at weka.core.WekaPackageClassLoaderManager.objectForName(WekaPackageClassLoaderManager.java:162)
        at weka.Run.findSchemeMatch(Run.java:90)
        at weka.core.Utils.forName(Utils.java:1114)
        at weka.attributeSelection.ASEvaluation.forName(ASEvaluation.java:125)
        at weka.filters.supervised.attribute.AttributeSelection.setOptions(AttributeSelection.java:294)
        at weka.filters.Filter.filterFile(Filter.java:1054)
        at weka.filters.Filter.runFilter(Filter.java:1411)
        at weka.filters.supervised.attribute.AttributeSelection.main(AttributeSelection.java:614)
Caused by: java.lang.ClassNotFoundException: no.uib.cipr.matrix.Matrix
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)



Kind regards,
Suhas Srinivasan



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

Message: 2
Date: Thu, 16 Feb 2017 20:56:32 +1300
From: Eibe Frank <[hidden email]>
To: "Weka machine learning workbench list."
        <[hidden email]>
Subject: Re: [Wekalist] Request help to run Principal Components from
        terminal
Message-ID:
        <CADehzLU+Cmtr4SWUTe+NjTn2sAOOt+bPTdXpPbO6XkvEh4ww=[hidden email]>
Content-Type: text/plain; charset="utf-8"

You may need to use weka.Run so that the MTJ classes are loaded correctly:

  java weka.Run .AttributeSelection -i <input_file> -E
".attributeSelection.PrincipalComponents -R 0.95 -A 5" -S ".Ranker ..."

Cheers,
Eibe

On Thu, Feb 16, 2017 at 1:56 PM, Srinivasan, Suhas <[hidden email]>
wrote:

> Hi,
>
> I have a large dataset and due to the memory requirements I have to run
> the Principal Components attribute selection on a linux server.
> But I don't know the proper command to run this from the terminal.
> Searching online yielded no results. Any help would be greatly appreciated.
> I have tested the below two commands got from the GUI logs. The classpath
> has been set in the environment and giving it as a command option did not
> help.
> Java 64 bit 1.8.0_121 and Weka 3.9.1.
>
> java -Xmx100g weka.attributeSelection.PrincipalComponents -i <input_file>
> -s "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" -R
> 0.95 -A 5 > <output_file>
> 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:381)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>
>
> java -Xmx100g weka.filters.supervised.attribute.AttributeSelection -i
> <input_file> -E "weka.attributeSelection.PrincipalComponents -R 0.95 -A
> 5" -S "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" >
> <output_file>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> no/uib/cipr/matrix/Matrix
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:348)
>         at weka.core.WekaPackageClassLoaderManager.forName(
> WekaPackageClassLoaderManager.java:198)
>         at weka.core.WekaPackageClassLoaderManager.forName(
> WekaPackageClassLoaderManager.java:178)
>         at weka.core.WekaPackageClassLoaderManager.objectForName(
> WekaPackageClassLoaderManager.java:162)
>         at weka.Run.findSchemeMatch(Run.java:90)
>         at weka.core.Utils.forName(Utils.java:1114)
>         at weka.attributeSelection.ASEvaluation.forName(
> ASEvaluation.java:125)
>         at weka.filters.supervised.attribute.AttributeSelection.
> setOptions(AttributeSelection.java:294)
>         at weka.filters.Filter.filterFile(Filter.java:1054)
>         at weka.filters.Filter.runFilter(Filter.java:1411)
>         at weka.filters.supervised.attribute.AttributeSelection.
> main(AttributeSelection.java:614)
> Caused by: java.lang.ClassNotFoundException: no.uib.cipr.matrix.Matrix
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>
>
>
> Kind regards,
> Suhas Srinivasan
>
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/
> mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~
> ml/weka/mailinglist_etiquette.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.waikato.ac.nz/pipermail/wekalist/attachments/20170216/6236313c/attachment-0001.html>

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

Message: 3
Date: Thu, 16 Feb 2017 13:56:38 +0000
From: "Srinivasan, Suhas" <[hidden email]>
To: Eibe Frank <[hidden email]>,
        "[hidden email]"   <[hidden email]>
Subject: [Wekalist] FW: Request help to run Principal Components        from
        terminal
Message-ID:
        <[hidden email]>

Content-Type: text/plain; charset="utf-8"

Hi Dr. Frank,

Thank you for the reply.
I tried out the below command but I still get an error.

java weka.Run.AttributeSelection -i input.arff -E "weka.attributeSelection.PrincipalComponents -R 0.95 -A 5" -S "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" > output.arff
Error: Could not find or load main class weka.Run.AttributeSelection

Could you please let me know if there is any other command I can try.

Kind regards,
Suhas Srinivasan

From: [hidden email] [mailto:[hidden email]] On Behalf Of Eibe Frank
Sent: Thursday, February 16, 2017 2:57 AM
To: Weka machine learning workbench list. <[hidden email]>
Subject: Re: [Wekalist] Request help to run Principal Components from terminal

You may need to use weka.Run so that the MTJ classes are loaded correctly:
? java weka.Run .AttributeSelection -i <input_file> -E ".attributeSelection.PrincipalComponents -R 0.95 -A 5" -S ".Ranker ..."
Cheers,
Eibe

On Thu, Feb 16, 2017 at 1:56 PM, Srinivasan, Suhas <[hidden email]> wrote:
Hi,

I have a large dataset and due to the memory requirements I have to run the Principal Components attribute selection on a linux server.
But I don't know the proper command to run this from the terminal. Searching online yielded no results. Any help would be greatly appreciated.
I have tested the below two commands got from the GUI logs. The classpath has been set in the environment and giving it as a command option did not help.
Java 64 bit 1.8.0_121 and Weka 3.9.1.

java -Xmx100g weka.attributeSelection.PrincipalComponents -i <input_file> -s "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" -R 0.95 -A 5 > <output_file>
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:381)
? ? ? ? at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
? ? ? ? at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
? ? ? ? at java.lang.ClassLoader.loadClass(ClassLoader.java:357)


java -Xmx100g weka.filters.supervised.attribute.AttributeSelection -i <input_file> -E "weka.attributeSelection.PrincipalComponents -R 0.95 -A 5" -S "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" > <output_file>
Exception in thread "main" java.lang.NoClassDefFoundError: no/uib/cipr/matrix/Matrix
? ? ? ? at java.lang.Class.forName0(Native Method)
? ? ? ? at java.lang.Class.forName(Class.java:348)
? ? ? ? at weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:198)
? ? ? ? at weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:178)
? ? ? ? at weka.core.WekaPackageClassLoaderManager.objectForName(WekaPackageClassLoaderManager.java:162)
? ? ? ? at weka.Run.findSchemeMatch(Run.java:90)
? ? ? ? at weka.core.Utils.forName(Utils.java:1114)
? ? ? ? at weka.attributeSelection.ASEvaluation.forName(ASEvaluation.java:125)
? ? ? ? at weka.filters.supervised.attribute.AttributeSelection.setOptions(AttributeSelection.java:294)
? ? ? ? at weka.filters.Filter.filterFile(Filter.java:1054)
? ? ? ? at weka.filters.Filter.runFilter(Filter.java:1411)
? ? ? ? at weka.filters.supervised.attribute.AttributeSelection.main(AttributeSelection.java:614)
Caused by: java.lang.ClassNotFoundException: no.uib.cipr.matrix.Matrix
? ? ? ? at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
? ? ? ? at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
? ? ? ? at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
? ? ? ? at java.lang.ClassLoader.loadClass(ClassLoader.java:357)



Kind regards,
Suhas Srinivasan

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00001.txt
URL: <http://list.waikato.ac.nz/pipermail/wekalist/attachments/20170216/85ef2667/attachment.txt>

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

_______________________________________________
Wekalist mailing list
[hidden email]
https://list.waikato.ac.nz/mailman/listinfo/wekalist


End of Wekalist Digest, Vol 168, Issue 35
*****************************************

 

 


_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Loading...