Quantcast

Request help to run Principal Components from terminal

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

Request help to run Principal Components from terminal

Srinivasan, Suhas
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Request help to run Principal Components from terminal

Eibe Frank-3
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


_______________________________________________
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

FW: Request help to run Principal Components from terminal

Srinivasan, Suhas
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


_______________________________________________
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

ATT00001.txt (396 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Request help to run Principal Components from terminal

Srinivasan, Suhas
Hi Dr. Frank,

Thank you very much! That worked.


Kind regards,
Suhas Srinivasan


-----Original Message-----
From: Eibe Frank [mailto:[hidden email]]
Sent: Thursday, February 16, 2017 4:36 PM
To: Srinivasan, Suhas <[hidden email]>
Subject: Re: [Wekalist] Request help to run Principal Components from terminal

The weka.Run class is a separate class that is used to match partial class names of other WEKA classes, load packages, etc.

You need to separate weka.Run from the rest of the command-line by using a space, i.e., use

  “weka.Run .AttributeSelection…”, not “weka.Run.AttributeSelection”

Cheers,
Eibe

> On 17/02/2017, at 2:56 AM, Srinivasan, Suhas <[hidden email]> wrote:
>
> 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(AttributeSel
> ection.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
>
> _______________________________________________
> 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

_______________________________________________
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...