Re: getting list of available classes including packages from command line

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

Re: getting list of available classes including packages from command line

Bradley E Harris

Hello, everyone.
As a small adendum to my last post, I was able to get weka.core.FindWithCapabilities to print to the screen
sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -superclass "weka.classifiers.Classifier" -generic

lists all available classes. I can also add things like
-binary-class
and filter that way.
However, the problem from my last post remains. Even though
UseDynamic=true
is set in the props file, the package-based classifiers still aren't being listed.

Thanks,
Brad Harris


Inactive hide details for "Bradley E Harris" ---07/26/2017 10:44:16 AM---Hi, everyone. I am trying to get a list of all the ava"Bradley E Harris" ---07/26/2017 10:44:16 AM---Hi, everyone. I am trying to get a list of all the available classes in weka including

From: "Bradley E Harris" <[hidden email]>
To: [hidden email]
Date: 07/26/2017 10:44 AM
Subject: [Wekalist] getting list of available classes including packages from command line
Sent by: [hidden email]





Hi, everyone.

I am trying to get a list of all the available classes in weka including the packages that I have added from the command line.
I at first thought I could use weka.core.FindWithCapabilities, but there's no way to print out the results or write them to a file. I can get around the requirement for X11, but it has to have the ability to write to a file. So,
I wrote a small java program that calls weka.gui.GenericPropertiesCreator, which is the suggestion I found on I believe an earlier post on this list. This is also the technique used by FindWithCapabilities.
I am running on a headless display, and the code requires X11. So, to get around that I wrote the code to output to a file and used xvfb to run it. I used the GenericPropertiesCreator.props file from the weka src directory after verifying that it contained the
UseDynamic=true
statement, which is supposed to list items from all the loaded packages, or that's what I've read anyway.
However, the generated file includes some packages but not others. For example, weka.classifiers.misc.IsolationForest doesn't show up in the resulting properties file. It also appears that NaiveBayesTree (or NBTree) is missing as well. However, things like AddativeRegression and MOA are there. My class path is set to point to weka.jar. Is weka not loading all available packages for some reason? I can, for example, access IsolationForest from the command line:
java weka.Run weka.classifiers.misc.IsolationForest
but it isn't in the generated properties file.
Below is my java code. I have no clue how to write java, so I used a mixture of sample code, FindWithCapabilities.java and the documentation for weka.gui.GenericPropertiesCreator
I'm sure I'm importing classes I don't need, but it doesn't seem to hurt it.
It compiles with javac
and, with my CLASSPATH variable set to point to weka.jar only it generates classifiers.properties with:
sudo xvfb-run java list_classifiers


----------

[myuser@localhost ~]$ more list_classifiers.java
import weka.core.Capabilities.Capability;
import weka.gui.GenericPropertiesCreator;


import java.io.BufferedReader;
import java.io.FileReader;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.Properties;
import java.util.StringTokenizer;
import java.util.Vector;
public class list_classifiers {
public static void main(String[] args) throws Exception {
try {
GenericPropertiesCreator creator;


creator = new GenericPropertiesCreator("/home/myuser/GenericPropertiesCreator.props");
creator.setExplicitPropsFile(true);
creator.setOutputFilename("classifiers.properties");
creator.execute(true, true);
} catch(Exception e){
}


}
}


Does anyone know how to write out the rest of the available classifiers?


Thanks,
Brad Harris



_______________________________________________
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

Re: getting list of available classes including packages from command line

Mark Hall
The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trunk and stable-3-8 to rectify this. You can get the fix in the next nightly snapshot or from subversion. Thanks for the bug report.

Cheers,
Mark.

On 27/07/17, 3:53 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:

    Hello, everyone.
    As a small adendum to my last post, I was able to get weka.core.FindWithCapabilities to print to the screen
    sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -superclass "weka.classifiers.Classifier" -generic
   
    lists all available classes.  I can also add things like
    -binary-class
    and filter that way.
    However, the problem from my last post remains.  Even though
    UseDynamic=true
    is set in the props file, the package-based classifiers still aren't being listed.
   
    Thanks,
    Brad Harris
   
   
    "Bradley E Harris" ---07/26/2017 10:44:16 AM---Hi, everyone. I am trying to get a list of all the available classes in weka including
   
    From:        "Bradley E Harris" <[hidden email]>
    To:        [hidden email]
    Date:        07/26/2017 10:44 AM
    Subject:        [Wekalist] getting list of available classes including packages        from command line
    Sent by:        [hidden email]
   
    ________________________________________
   
   
   
    Hi, everyone.
   
    I am trying to get a list of all the available classes in weka including the packages that I have added from the command line.
    I at first thought I could use weka.core.FindWithCapabilities, but there's no way to print out the results or write them to a file. I can get around the requirement for X11, but it has to have the ability to write to a file. So,
    I wrote a small java program that calls weka.gui.GenericPropertiesCreator, which is the suggestion I found on I believe an earlier post on this list. This is also the technique used by FindWithCapabilities.
    I am running on a headless display, and the code requires X11. So, to get around that I wrote the code to output to a file and used xvfb to run it. I used the GenericPropertiesCreator.props file from the weka src directory after verifying that it contained the
    UseDynamic=true
    statement, which is supposed to list items from all the loaded packages, or that's what I've read anyway.
    However, the generated file includes some packages but not others. For example, weka.classifiers.misc.IsolationForest doesn't show up in the resulting properties file. It also appears that NaiveBayesTree (or NBTree) is missing as well. However, things like AddativeRegression and MOA are there. My class path is set to point to weka.jar. Is weka not loading all available packages for some reason? I can, for example, access IsolationForest from the command line:
    java weka.Run weka.classifiers.misc.IsolationForest
    but it isn't in the generated properties file.
    Below is my java code. I have no clue how to write java, so I used a mixture of sample code, FindWithCapabilities.java and the documentation for weka.gui.GenericPropertiesCreator
    I'm sure I'm importing classes I don't need, but it doesn't seem to hurt it.
    It compiles with javac
    and, with my CLASSPATH variable set to point to weka.jar only it generates classifiers.properties with:
    sudo xvfb-run java list_classifiers
   
    ----------
    [myuser@localhost ~]$ more list_classifiers.java
    import weka.core.Capabilities.Capability;
    import weka.gui.GenericPropertiesCreator;
   
    import java.io.BufferedReader;
    import java.io.FileReader;
    import java.util.Enumeration;
    import java.util.Iterator;
    import java.util.Properties;
    import java.util.StringTokenizer;
    import java.util.Vector;
    public class list_classifiers {
    public static void main(String[] args) throws Exception {
    try {
    GenericPropertiesCreator creator;
   
    creator = new GenericPropertiesCreator("/home/myuser/GenericPropertiesCreator.props");
    creator.setExplicitPropsFile(true);
    creator.setOutputFilename("classifiers.properties");
    creator.execute(true, true);
    } catch(Exception e){
    }
   
    }
    }
   
    Does anyone know how to write out the rest of the available classifiers?
   
    Thanks,
    Brad Harris
   
   
    _______________________________________________
    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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: getting list of available classes including packages from command line

Bradley E Harris

Hi, Mark.

Was this fix committed to 3.9.1 as well? I'm using that one instead of 3.8.1, or would it be advisable to use 3.8.1 ?

Thank you so much for fixing the bug. That definitely helps so much.

Thanks,
Brad


Inactive hide details for Mark Hall ---07/26/2017 06:33:28 PM---The main method in FindWidthCapabilities was not loading packagMark Hall ---07/26/2017 06:33:28 PM---The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trun

From: Mark Hall <[hidden email]>
To: "Weka machine learning workbench list." <[hidden email]>
Date: 07/26/2017 06:33 PM
Subject: Re: [Wekalist] getting list of available classes including packages from command line
Sent by: [hidden email]





The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trunk and stable-3-8 to rectify this. You can get the fix in the next nightly snapshot or from subversion. Thanks for the bug report.

Cheers,
Mark.

On 27/07/17, 3:53 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:

   Hello, everyone.
   As a small adendum to my last post, I was able to get weka.core.FindWithCapabilities to print to the screen
   sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -superclass "weka.classifiers.Classifier" -generic
   
   lists all available classes.  I can also add things like
   -binary-class
   and filter that way.
   However, the problem from my last post remains.  Even though
   UseDynamic=true
   is set in the props file, the package-based classifiers still aren't being listed.
   
   Thanks,
   Brad Harris
   
   
   "Bradley E Harris" ---07/26/2017 10:44:16 AM---Hi, everyone. I am trying to get a list of all the available classes in weka including
   
   From:        "Bradley E Harris" <[hidden email]>
   To:        [hidden email]
   Date:        07/26/2017 10:44 AM
   Subject:        [Wekalist] getting list of available classes including packages        from command line
   Sent by:        [hidden email]
   
   ________________________________________
   
   
   
   Hi, everyone.
   
   I am trying to get a list of all the available classes in weka including the packages that I have added from the command line.
   I at first thought I could use weka.core.FindWithCapabilities, but there's no way to print out the results or write them to a file. I can get around the requirement for X11, but it has to have the ability to write to a file. So,
   I wrote a small java program that calls weka.gui.GenericPropertiesCreator, which is the suggestion I found on I believe an earlier post on this list. This is also the technique used by FindWithCapabilities.
   I am running on a headless display, and the code requires X11. So, to get around that I wrote the code to output to a file and used xvfb to run it. I used the GenericPropertiesCreator.props file from the weka src directory after verifying that it contained the
   UseDynamic=true
   statement, which is supposed to list items from all the loaded packages, or that's what I've read anyway.
   However, the generated file includes some packages but not others. For example, weka.classifiers.misc.IsolationForest doesn't show up in the resulting properties file. It also appears that NaiveBayesTree (or NBTree) is missing as well. However, things like AddativeRegression and MOA are there. My class path is set to point to weka.jar. Is weka not loading all available packages for some reason? I can, for example, access IsolationForest from the command line:
   java weka.Run weka.classifiers.misc.IsolationForest
   but it isn't in the generated properties file.
   Below is my java code. I have no clue how to write java, so I used a mixture of sample code, FindWithCapabilities.java and the documentation for weka.gui.GenericPropertiesCreator
   I'm sure I'm importing classes I don't need, but it doesn't seem to hurt it.
   It compiles with javac
   and, with my CLASSPATH variable set to point to weka.jar only it generates classifiers.properties with:
   sudo xvfb-run java list_classifiers
   
   ----------
   [myuser@localhost ~]$ more list_classifiers.java
   import weka.core.Capabilities.Capability;
   import weka.gui.GenericPropertiesCreator;
   
   import java.io.BufferedReader;
   import java.io.FileReader;
   import java.util.Enumeration;
   import java.util.Iterator;
   import java.util.Properties;
   import java.util.StringTokenizer;
   import java.util.Vector;
   public class list_classifiers {
   public static void main(String[] args) throws Exception {
   try {
   GenericPropertiesCreator creator;
   
   creator = new GenericPropertiesCreator("/home/myuser/GenericPropertiesCreator.props");
   creator.setExplicitPropsFile(true);
   creator.setOutputFilename("classifiers.properties");
   creator.execute(true, true);
   } catch(Exception e){
   }
   
   }
   }
   
   Does anyone know how to write out the rest of the available classifiers?
   
   Thanks,
   Brad Harris
   
   
   _______________________________________________
   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





_______________________________________________
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: getting list of available classes including packages from command line

Bradley E Harris
In reply to this post by Mark Hall

Hi, Mark.

I think I must be doing something wrong. I've downloaded 3.9.1, 3.8.1, stable-branch-3.8 and developer-branch
and none of them seems to load the additional packages, even though the props file is set to UseDynamic=true
Did I download the wrong branch or file? I just finished testing both nightly snapshots. I'm not sure what's going wrong. Is it possible that the last snapshot was taken before you introduced the fix? Did I download the wrong zip files?
Do the packages lack the descriptor field that says, for example, that the package is a binary classifier?
Perhaps it's loading packages and just not being able to match?

On an odd note, weka.core.FindWithCapabilities doesn't work when preceeded by weka.Run

Here is my command line:
sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -binary-class -generic -superclass weka.classifiers.Classifier
with $CLASSPATH set to
/home/myuser/wekafiles/packages/snowball-stemmers/snowball-stemmers.jar:/home/myuser/bin/weka-stable-branch/weka/weka.jar

Am I doing something wrong?

Thanks,
Brad


Inactive hide details for Mark Hall ---07/26/2017 06:33:28 PM---The main method in FindWidthCapabilities was not loading packagMark Hall ---07/26/2017 06:33:28 PM---The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trun

From: Mark Hall <[hidden email]>
To: "Weka machine learning workbench list." <[hidden email]>
Date: 07/26/2017 06:33 PM
Subject: Re: [Wekalist] getting list of available classes including packages from command line
Sent by: [hidden email]





The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trunk and stable-3-8 to rectify this. You can get the fix in the next nightly snapshot or from subversion. Thanks for the bug report.

Cheers,
Mark.

On 27/07/17, 3:53 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:

   Hello, everyone.
   As a small adendum to my last post, I was able to get weka.core.FindWithCapabilities to print to the screen
   sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -superclass "weka.classifiers.Classifier" -generic
   
   lists all available classes.  I can also add things like
   -binary-class
   and filter that way.
   However, the problem from my last post remains.  Even though
   UseDynamic=true
   is set in the props file, the package-based classifiers still aren't being listed.
   
   Thanks,
   Brad Harris
   
   
   "Bradley E Harris" ---07/26/2017 10:44:16 AM---Hi, everyone. I am trying to get a list of all the available classes in weka including
   
   From:        "Bradley E Harris" <[hidden email]>
   To:        [hidden email]
   Date:        07/26/2017 10:44 AM
   Subject:        [Wekalist] getting list of available classes including packages        from command line
   Sent by:        [hidden email]
   
   ________________________________________
   
   
   
   Hi, everyone.
   
   I am trying to get a list of all the available classes in weka including the packages that I have added from the command line.
   I at first thought I could use weka.core.FindWithCapabilities, but there's no way to print out the results or write them to a file. I can get around the requirement for X11, but it has to have the ability to write to a file. So,
   I wrote a small java program that calls weka.gui.GenericPropertiesCreator, which is the suggestion I found on I believe an earlier post on this list. This is also the technique used by FindWithCapabilities.
   I am running on a headless display, and the code requires X11. So, to get around that I wrote the code to output to a file and used xvfb to run it. I used the GenericPropertiesCreator.props file from the weka src directory after verifying that it contained the
   UseDynamic=true
   statement, which is supposed to list items from all the loaded packages, or that's what I've read anyway.
   However, the generated file includes some packages but not others. For example, weka.classifiers.misc.IsolationForest doesn't show up in the resulting properties file. It also appears that NaiveBayesTree (or NBTree) is missing as well. However, things like AddativeRegression and MOA are there. My class path is set to point to weka.jar. Is weka not loading all available packages for some reason? I can, for example, access IsolationForest from the command line:
   java weka.Run weka.classifiers.misc.IsolationForest
   but it isn't in the generated properties file.
   Below is my java code. I have no clue how to write java, so I used a mixture of sample code, FindWithCapabilities.java and the documentation for weka.gui.GenericPropertiesCreator
   I'm sure I'm importing classes I don't need, but it doesn't seem to hurt it.
   It compiles with javac
   and, with my CLASSPATH variable set to point to weka.jar only it generates classifiers.properties with:
   sudo xvfb-run java list_classifiers
   
   ----------
   [myuser@localhost ~]$ more list_classifiers.java
   import weka.core.Capabilities.Capability;
   import weka.gui.GenericPropertiesCreator;
   
   import java.io.BufferedReader;
   import java.io.FileReader;
   import java.util.Enumeration;
   import java.util.Iterator;
   import java.util.Properties;
   import java.util.StringTokenizer;
   import java.util.Vector;
   public class list_classifiers {
   public static void main(String[] args) throws Exception {
   try {
   GenericPropertiesCreator creator;
   
   creator = new GenericPropertiesCreator("/home/myuser/GenericPropertiesCreator.props");
   creator.setExplicitPropsFile(true);
   creator.setOutputFilename("classifiers.properties");
   creator.execute(true, true);
   } catch(Exception e){
   }
   
   }
   }
   
   Does anyone know how to write out the rest of the available classifiers?
   
   Thanks,
   Brad Harris
   
   
   _______________________________________________
   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





_______________________________________________
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: getting list of available classes including packages from command line

Mark Hall
Damn! I obviously didn't look too closely at the output generated by FindWithCapabilities :-) I've committed another fix to both trunk (3.9) and stable-3-8. FindWindCapabilities now uses WekaPackageClassloaderManager to instantiate potential matches instead of Class.forName() (which fails for package-based schemes). It also now implements CommandlineRunnable, so can be executed with weka.Run. The fix will be in the next nightly snapshot. Sorry for the confusion.

Cheers,
Mark.

On 28/07/17, 5:51 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:

    Hi, Mark.
   
    I think I must be doing something wrong. I've downloaded 3.9.1, 3.8.1, stable-branch-3.8 and developer-branch
    and none of them seems to load the additional packages, even though the props file is set to UseDynamic=true
    Did I download the wrong branch or file?  I just finished testing both nightly snapshots.  I'm not sure what's going wrong.  Is it possible that the last snapshot was taken before you introduced the fix?  Did I download the wrong zip files?
    Do the packages lack the descriptor field that says, for example, that the package is a binary classifier?
    Perhaps it's loading packages and just not being able to match?
   
    On an odd note, weka.core.FindWithCapabilities doesn't work when preceeded by weka.Run
   
    Here is my command line:
    sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -binary-class -generic -superclass weka.classifiers.Classifier
    with $CLASSPATH set to
    /home/myuser/wekafiles/packages/snowball-stemmers/snowball-stemmers.jar:/home/myuser/bin/weka-stable-branch/weka/weka.jar
   
    Am I doing something wrong?
   
    Thanks,
    Brad
   
   
    Mark Hall ---07/26/2017 06:33:28 PM---The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trun
   
    From:        Mark Hall <[hidden email]>
    To:        "Weka machine learning workbench list." <[hidden email]>
    Date:        07/26/2017 06:33 PM
    Subject:        Re: [Wekalist] getting list of available classes including packages from command line
    Sent by:        [hidden email]
   
    ________________________________________
   
   
   
    The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trunk and stable-3-8 to rectify this. You can get the fix in the next nightly snapshot or from subversion. Thanks for the bug report.
   
    Cheers,
    Mark.
   
    On 27/07/17, 3:53 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:
   
        Hello, everyone.
        As a small adendum to my last post, I was able to get weka.core.FindWithCapabilities to print to the screen
        sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -superclass "weka.classifiers.Classifier" -generic
       
        lists all available classes.  I can also add things like
        -binary-class
        and filter that way.
        However, the problem from my last post remains.  Even though
        UseDynamic=true
        is set in the props file, the package-based classifiers still aren't being listed.
       
        Thanks,
        Brad Harris
       
       
        "Bradley E Harris" ---07/26/2017 10:44:16 AM---Hi, everyone. I am trying to get a list of all the available classes in weka including
       
        From:        "Bradley E Harris" <[hidden email]>
        To:        [hidden email]
        Date:        07/26/2017 10:44 AM
        Subject:        [Wekalist] getting list of available classes including packages        from command line
        Sent by:        [hidden email]
       
        ________________________________________
       
       
       
        Hi, everyone.
       
        I am trying to get a list of all the available classes in weka including the packages that I have added from the command line.
        I at first thought I could use weka.core.FindWithCapabilities, but there's no way to print out the results or write them to a file. I can get around the requirement for X11, but it has to have the ability to write to a file. So,
        I wrote a small java program that calls weka.gui.GenericPropertiesCreator, which is the suggestion I found on I believe an earlier post on this list. This is also the technique used by FindWithCapabilities.
        I am running on a headless display, and the code requires X11. So, to get around that I wrote the code to output to a file and used xvfb to run it. I used the GenericPropertiesCreator.props file from the weka src directory after verifying that it contained the
        UseDynamic=true
        statement, which is supposed to list items from all the loaded packages, or that's what I've read anyway.
        However, the generated file includes some packages but not others. For example, weka.classifiers.misc.IsolationForest doesn't show up in the resulting properties file. It also appears that NaiveBayesTree (or NBTree) is missing as well. However, things like AddativeRegression and MOA are there. My class path is set to point to weka.jar. Is weka not loading all available packages for some reason? I can, for example, access IsolationForest from the command line:
        java weka.Run weka.classifiers.misc.IsolationForest
        but it isn't in the generated properties file.
        Below is my java code. I have no clue how to write java, so I used a mixture of sample code, FindWithCapabilities.java and the documentation for weka.gui.GenericPropertiesCreator
        I'm sure I'm importing classes I don't need, but it doesn't seem to hurt it.
        It compiles with javac
        and, with my CLASSPATH variable set to point to weka.jar only it generates classifiers.properties with:
        sudo xvfb-run java list_classifiers
       
        ----------
        [myuser@localhost ~]$ more list_classifiers.java
        import weka.core.Capabilities.Capability;
        import weka.gui.GenericPropertiesCreator;
       
        import java.io.BufferedReader;
        import java.io.FileReader;
        import java.util.Enumeration;
        import java.util.Iterator;
        import java.util.Properties;
        import java.util.StringTokenizer;
        import java.util.Vector;
        public class list_classifiers {
        public static void main(String[] args) throws Exception {
        try {
        GenericPropertiesCreator creator;
       
        creator = new GenericPropertiesCreator("/home/myuser/GenericPropertiesCreator.props");
        creator.setExplicitPropsFile(true);
        creator.setOutputFilename("classifiers.properties");
        creator.execute(true, true);
        } catch(Exception e){
        }
       
        }
        }
       
        Does anyone know how to write out the rest of the available classifiers?
       
        Thanks,
        Brad Harris
       
       
        _______________________________________________
        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
   
   
   
   
   
    _______________________________________________
    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

Re: getting list of available classes including packages from command line

Bradley E Harris

Hi, Mark.

Thanks for the bug fix. I'll test it on both stable and development branches and let you know. I definitely appreciate the fix. This one has bothered me ever since I couldn't figure out why my Java program didn't work. :)

Also, thank you for implementing the CLI interface. This helps a lot. xvfb-run isn't difficult, but this makes things less resource intensive. :)

Thanks,
Brad


Inactive hide details for Mark Hall ---07/27/2017 07:17:17 PM---Damn! I obviously didn't look too closely at the output generatMark Hall ---07/27/2017 07:17:17 PM---Damn! I obviously didn't look too closely at the output generated by FindWithCapabilities :-) I've c

From: Mark Hall <[hidden email]>
To: "Weka machine learning workbench list." <[hidden email]>
Date: 07/27/2017 07:17 PM
Subject: Re: [Wekalist] getting list of available classes including packages from command line
Sent by: [hidden email]





Damn! I obviously didn't look too closely at the output generated by FindWithCapabilities :-) I've committed another fix to both trunk (3.9) and stable-3-8. FindWindCapabilities now uses WekaPackageClassloaderManager to instantiate potential matches instead of Class.forName() (which fails for package-based schemes). It also now implements CommandlineRunnable, so can be executed with weka.Run. The fix will be in the next nightly snapshot. Sorry for the confusion.

Cheers,
Mark.

On 28/07/17, 5:51 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:

   Hi, Mark.
   
   I think I must be doing something wrong. I've downloaded 3.9.1, 3.8.1, stable-branch-3.8 and developer-branch
   and none of them seems to load the additional packages, even though the props file is set to UseDynamic=true
   Did I download the wrong branch or file?  I just finished testing both nightly snapshots.  I'm not sure what's going wrong.  Is it possible that the last snapshot was taken before you introduced the fix?  Did I download the wrong zip files?
   Do the packages lack the descriptor field that says, for example, that the package is a binary classifier?
   Perhaps it's loading packages and just not being able to match?
   
   On an odd note, weka.core.FindWithCapabilities doesn't work when preceeded by weka.Run
   
   Here is my command line:
   sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -binary-class -generic -superclass weka.classifiers.Classifier
   with $CLASSPATH set to
   /home/myuser/wekafiles/packages/snowball-stemmers/snowball-stemmers.jar:/home/myuser/bin/weka-stable-branch/weka/weka.jar
   
   Am I doing something wrong?
   
   Thanks,
   Brad
   
   
   Mark Hall ---07/26/2017 06:33:28 PM---The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trun
   
   From:        Mark Hall <[hidden email]>
   To:        "Weka machine learning workbench list." <[hidden email]>
   Date:        07/26/2017 06:33 PM
   Subject:        Re: [Wekalist] getting list of available classes including packages from command line
   Sent by:        [hidden email]
   
   ________________________________________
   
   
   
   The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trunk and stable-3-8 to rectify this. You can get the fix in the next nightly snapshot or from subversion. Thanks for the bug report.
   
   Cheers,
   Mark.
   
   On 27/07/17, 3:53 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:
   
       Hello, everyone.
       As a small adendum to my last post, I was able to get weka.core.FindWithCapabilities to print to the screen
       sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -superclass "weka.classifiers.Classifier" -generic
       
       lists all available classes.  I can also add things like
       -binary-class
       and filter that way.
       However, the problem from my last post remains.  Even though
       UseDynamic=true
       is set in the props file, the package-based classifiers still aren't being listed.
       
       Thanks,
       Brad Harris
       
       
       "Bradley E Harris" ---07/26/2017 10:44:16 AM---Hi, everyone. I am trying to get a list of all the available classes in weka including
       
       From:        "Bradley E Harris" <[hidden email]>
       To:        [hidden email]
       Date:        07/26/2017 10:44 AM
       Subject:        [Wekalist] getting list of available classes including packages        from command line
       Sent by:        [hidden email]
       
       ________________________________________
       
       
       
       Hi, everyone.
       
       I am trying to get a list of all the available classes in weka including the packages that I have added from the command line.
       I at first thought I could use weka.core.FindWithCapabilities, but there's no way to print out the results or write them to a file. I can get around the requirement for X11, but it has to have the ability to write to a file. So,
       I wrote a small java program that calls weka.gui.GenericPropertiesCreator, which is the suggestion I found on I believe an earlier post on this list. This is also the technique used by FindWithCapabilities.
       I am running on a headless display, and the code requires X11. So, to get around that I wrote the code to output to a file and used xvfb to run it. I used the GenericPropertiesCreator.props file from the weka src directory after verifying that it contained the
       UseDynamic=true
       statement, which is supposed to list items from all the loaded packages, or that's what I've read anyway.
       However, the generated file includes some packages but not others. For example, weka.classifiers.misc.IsolationForest doesn't show up in the resulting properties file. It also appears that NaiveBayesTree (or NBTree) is missing as well. However, things like AddativeRegression and MOA are there. My class path is set to point to weka.jar. Is weka not loading all available packages for some reason? I can, for example, access IsolationForest from the command line:
       java weka.Run weka.classifiers.misc.IsolationForest
       but it isn't in the generated properties file.
       Below is my java code. I have no clue how to write java, so I used a mixture of sample code, FindWithCapabilities.java and the documentation for weka.gui.GenericPropertiesCreator
       I'm sure I'm importing classes I don't need, but it doesn't seem to hurt it.
       It compiles with javac
       and, with my CLASSPATH variable set to point to weka.jar only it generates classifiers.properties with:
       sudo xvfb-run java list_classifiers
       
       ----------
       [myuser@localhost ~]$ more list_classifiers.java
       import weka.core.Capabilities.Capability;
       import weka.gui.GenericPropertiesCreator;
       
       import java.io.BufferedReader;
       import java.io.FileReader;
       import java.util.Enumeration;
       import java.util.Iterator;
       import java.util.Properties;
       import java.util.StringTokenizer;
       import java.util.Vector;
       public class list_classifiers {
       public static void main(String[] args) throws Exception {
       try {
       GenericPropertiesCreator creator;
       
       creator = new GenericPropertiesCreator("/home/myuser/GenericPropertiesCreator.props");
       creator.setExplicitPropsFile(true);
       creator.setOutputFilename("classifiers.properties");
       creator.execute(true, true);
       } catch(Exception e){
       }
       
       }
       }
       
       Does anyone know how to write out the rest of the available classifiers?
       
       Thanks,
       Brad Harris
       
       
       _______________________________________________
       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
   
   
   
   
   
   _______________________________________________
   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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: getting list of available classes including packages from command line

Bradley E Harris
In reply to this post by Mark Hall

Hi, Mark.
Unfortunately neither the developer nor stable-3-8 branch snapshots as of July 31 work either with the weka.Run interface nor seem to load all the packages with
weka.core.FindWithCapabilities
I verified that my generic properties creator props file has UseDynamic=true set.
my command lines are:
java -Djava.awt.headless=true weka.Run weka.core.FindWithCapabilities -binary-class -numeric-atts -generic -superclass weka.classifiers.Classifier
and
sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -binary-class -numeric-atts -generic -superclass weka.classifiers.Classifier

I'm using
Java 1.8.0-141-B16
on Centos 7
if that helps.

I'm not sure what's going on. When I set
java.awt.headless=true
I get more errors from javax.

For some reason, I get far fewer complaints using the developer branch snapshot. In stable a lot of packages complain that they don't support Weka 3.8.2
but neither snapshot seems to work with weka.Run or finds packages.

Is there any further testing that I can do on my end?
Thanks so much for working with this.

Brad



Inactive hide details for "Bradley E Harris" ---07/28/2017 10:33:10 AM---Hi, Mark. Thanks for the bug fix.  I'll test it on bot"Bradley E Harris" ---07/28/2017 10:33:10 AM---Hi, Mark. Thanks for the bug fix. I'll test it on both stable and development

From: "Bradley E Harris" <[hidden email]>
To: "Weka machine learning workbench list." <[hidden email]>
Date: 07/28/2017 10:33 AM
Subject: Re: [Wekalist] getting list of available classes including packages from command line
Sent by: [hidden email]





Hi, Mark.

Thanks for the bug fix. I'll test it on both stable and development branches and let you know. I definitely appreciate the fix. This one has bothered me ever since I couldn't figure out why my Java program didn't work. :)


Also, thank you for implementing the CLI interface. This helps a lot. xvfb-run isn't difficult, but this makes things less resource intensive. :)


Thanks,
Brad



Inactive hide details for Mark Hall ---07/27/2017 07:17:17 PM---Damn! I obviously didn't look too closely at the output generatMark Hall ---07/27/2017 07:17:17 PM---Damn! I obviously didn't look too closely at the output generated by FindWithCapabilities :-) I've c

From:
Mark Hall <[hidden email]>
To:
"Weka machine learning workbench list." <[hidden email]>
Date:
07/27/2017 07:17 PM
Subject:
Re: [Wekalist] getting list of available classes including packages from command line
Sent by:
[hidden email]




Damn! I obviously didn't look too closely at the output generated by FindWithCapabilities :-) I've committed another fix to both trunk (3.9) and stable-3-8. FindWindCapabilities now uses WekaPackageClassloaderManager to instantiate potential matches instead of Class.forName() (which fails for package-based schemes). It also now implements CommandlineRunnable, so can be executed with weka.Run. The fix will be in the next nightly snapshot. Sorry for the confusion.

Cheers,
Mark.

On 28/07/17, 5:51 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:

  Hi, Mark.
 
  I think I must be doing something wrong. I've downloaded 3.9.1, 3.8.1, stable-branch-3.8 and developer-branch
  and none of them seems to load the additional packages, even though the props file is set to UseDynamic=true
  Did I download the wrong branch or file?  I just finished testing both nightly snapshots.  I'm not sure what's going wrong.  Is it possible that the last snapshot was taken before you introduced the fix?  Did I download the wrong zip files?
  Do the packages lack the descriptor field that says, for example, that the package is a binary classifier?
  Perhaps it's loading packages and just not being able to match?
 
  On an odd note, weka.core.FindWithCapabilities doesn't work when preceeded by weka.Run
 
  Here is my command line:
  sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -binary-class -generic -superclass weka.classifiers.Classifier
  with $CLASSPATH set to
  /home/myuser/wekafiles/packages/snowball-stemmers/snowball-stemmers.jar:/home/myuser/bin/weka-stable-branch/weka/weka.jar
 
  Am I doing something wrong?
 
  Thanks,
  Brad
 
 
  Mark Hall ---07/26/2017 06:33:28 PM---The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trun
 
  From:        Mark Hall <[hidden email]>
  To:        "Weka machine learning workbench list." <[hidden email]>
  Date:        07/26/2017 06:33 PM
  Subject:        Re: [Wekalist] getting list of available classes including packages from command line
  Sent by:        [hidden email]
 
  ________________________________________
 
 
 
  The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trunk and stable-3-8 to rectify this. You can get the fix in the next nightly snapshot or from subversion. Thanks for the bug report.
 
  Cheers,
  Mark.
 
  On 27/07/17, 3:53 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:
 
      Hello, everyone.
      As a small adendum to my last post, I was able to get weka.core.FindWithCapabilities to print to the screen
      sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -superclass "weka.classifiers.Classifier" -generic
     
      lists all available classes.  I can also add things like
      -binary-class
      and filter that way.
      However, the problem from my last post remains.  Even though
      UseDynamic=true
      is set in the props file, the package-based classifiers still aren't being listed.
     
      Thanks,
      Brad Harris
     
     
      "Bradley E Harris" ---07/26/2017 10:44:16 AM---Hi, everyone. I am trying to get a list of all the available classes in weka including
     
      From:        "Bradley E Harris" <[hidden email]>
      To:        [hidden email]
      Date:        07/26/2017 10:44 AM
      Subject:        [Wekalist] getting list of available classes including packages        from command line
      Sent by:        [hidden email]
     
      ________________________________________
     
     
     
      Hi, everyone.
     
      I am trying to get a list of all the available classes in weka including the packages that I have added from the command line.
      I at first thought I could use weka.core.FindWithCapabilities, but there's no way to print out the results or write them to a file. I can get around the requirement for X11, but it has to have the ability to write to a file. So,
      I wrote a small java program that calls weka.gui.GenericPropertiesCreator, which is the suggestion I found on I believe an earlier post on this list. This is also the technique used by FindWithCapabilities.
      I am running on a headless display, and the code requires X11. So, to get around that I wrote the code to output to a file and used xvfb to run it. I used the GenericPropertiesCreator.props file from the weka src directory after verifying that it contained the
      UseDynamic=true
      statement, which is supposed to list items from all the loaded packages, or that's what I've read anyway.
      However, the generated file includes some packages but not others. For example, weka.classifiers.misc.IsolationForest doesn't show up in the resulting properties file. It also appears that NaiveBayesTree (or NBTree) is missing as well. However, things like AddativeRegression and MOA are there. My class path is set to point to weka.jar. Is weka not loading all available packages for some reason? I can, for example, access IsolationForest from the command line:
      java weka.Run weka.classifiers.misc.IsolationForest
      but it isn't in the generated properties file.
      Below is my java code. I have no clue how to write java, so I used a mixture of sample code, FindWithCapabilities.java and the documentation for weka.gui.GenericPropertiesCreator
      I'm sure I'm importing classes I don't need, but it doesn't seem to hurt it.
      It compiles with javac
      and, with my CLASSPATH variable set to point to weka.jar only it generates classifiers.properties with:
      sudo xvfb-run java list_classifiers
     
      ----------
      [myuser@localhost ~]$ more list_classifiers.java
      import weka.core.Capabilities.Capability;
      import weka.gui.GenericPropertiesCreator;
     
      import java.io.BufferedReader;
      import java.io.FileReader;
      import java.util.Enumeration;
      import java.util.Iterator;
      import java.util.Properties;
      import java.util.StringTokenizer;
      import java.util.Vector;
      public class list_classifiers {
      public static void main(String[] args) throws Exception {
      try {
      GenericPropertiesCreator creator;
     
      creator = new GenericPropertiesCreator("/home/myuser/GenericPropertiesCreator.props");
      creator.setExplicitPropsFile(true);
      creator.setOutputFilename("classifiers.properties");
      creator.execute(true, true);
      } catch(Exception e){
      }
     
      }
      }
     
      Does anyone know how to write out the rest of the available classifiers?
     
      Thanks,
      Brad Harris
     
     
      _______________________________________________
      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
 
 
 
 
 
  _______________________________________________
  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




_______________________________________________
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: getting list of available classes including packages from command line

Mark Hall
I've just checked the developer nightly snapshot and it is working for me on my Mac. You are correct that there are some fatal exceptions generated when headless is set to true, but these appear to be only from the scatterPlot3D and associationRulesVisualizer packages for me, and stem from 3rd party libraries used therein (we have no control over that). There is also a harmless exception (warning?) from dl4j that I've omitted from the output below:

Selenium:weka mhall$ java -Djava.awt.headless=true -cp weka.jar weka.Run .FindWithCapabilities -superclass weka.classifiers.Classifier -generic
Getting parent classloader....
Injecting JRI classes into the root class loader...
Trying systemwide default location for R under Mac OS...
Trying to loaded R library from /Library/Frameworks/R.framework/Resources/library/rJava/jri/libjri.jnilib
Engine class: class org.rosuda.JRI.Rengine ClassLoader:sun.misc.Launcher$ExtClassLoader@7cc355be
Successfully loaded R library from /Library/Frameworks/R.framework/Resources/library/rJava/jri/libjri.jnilib
Getting REngine....
Setting a default package mirror in R...

Searching for the following Capabilities:
- allowed:
- not allowed: -

Found 163 classes that matched the criteria:

weka.classifiers.bayes.BayesianLogisticRegression
weka.classifiers.bayes.BayesNet
weka.classifiers.bayes.ComplementNaiveBayes
weka.classifiers.bayes.DMNBtext
weka.classifiers.bayes.HMM
weka.classifiers.bayes.HNB
weka.classifiers.bayes.NaiveBayes
weka.classifiers.bayes.NaiveBayesMultinomial
weka.classifiers.bayes.NaiveBayesMultinomialText
weka.classifiers.bayes.NaiveBayesMultinomialUpdateable
weka.classifiers.bayes.NaiveBayesSimple
weka.classifiers.bayes.NaiveBayesUpdateable
weka.classifiers.bayes.SparseGenerativeModel
weka.classifiers.functions.Dl4jMlpClassifier
weka.classifiers.functions.ElasticNet
weka.classifiers.functions.FLDA
weka.classifiers.functions.GaussianProcesses
weka.classifiers.functions.IsotonicRegression
weka.classifiers.functions.KernelLogisticRegression
weka.classifiers.functions.LDA
weka.classifiers.functions.LeastMedSq
weka.classifiers.functions.LibLINEAR
weka.classifiers.functions.LibSVM
weka.classifiers.functions.LinearRegression
weka.classifiers.functions.Logistic
weka.classifiers.functions.MLPClassifier
weka.classifiers.functions.MLPRegressor
weka.classifiers.functions.MultilayerPerceptron
weka.classifiers.functions.MultilayerPerceptronCS
weka.classifiers.functions.NonNegativeLogisticRegression
weka.classifiers.functions.PaceRegression
weka.classifiers.functions.PLSClassifier
weka.classifiers.functions.QDA
weka.classifiers.functions.RBFClassifier
weka.classifiers.functions.RBFNetwork
weka.classifiers.functions.RBFRegressor
weka.classifiers.functions.SGD
weka.classifiers.functions.SGDText
weka.classifiers.functions.SimpleLinearRegression
weka.classifiers.functions.SimpleLogistic
weka.classifiers.functions.SMO
weka.classifiers.functions.SMOreg
weka.classifiers.functions.SPegasos
weka.classifiers.functions.VotedPerceptron
weka.classifiers.functions.Winnow
weka.classifiers.lazy.AnalogicalModeling
weka.classifiers.lazy.IB1
weka.classifiers.lazy.IBk
weka.classifiers.lazy.IBkLG
weka.classifiers.lazy.KStar
weka.classifiers.lazy.LBR
weka.classifiers.lazy.LocalKnn
weka.classifiers.lazy.LWL
weka.classifiers.lazy.RseslibKnn
weka.classifiers.meta.AdaBoostM1
weka.classifiers.meta.AdditiveRegression
weka.classifiers.meta.AggregateableFilteredClassifier
weka.classifiers.meta.AggregateableFilteredClassifierUpdateable
weka.classifiers.meta.AttributeSelectedClassifier
weka.classifiers.meta.Bagging
weka.classifiers.meta.BatchPredictorVote
weka.classifiers.meta.ClassificationViaClustering
weka.classifiers.meta.ClassificationViaRegression
weka.classifiers.meta.CostSensitiveClassifier
weka.classifiers.meta.Dagging
weka.classifiers.meta.END
weka.classifiers.meta.EnsembleSelection
weka.classifiers.meta.FilteredClassifier
weka.classifiers.meta.FilteredClassifierUpdateable
weka.classifiers.meta.GridSearch
weka.classifiers.meta.IterativeAbsoluteErrorRegression
weka.classifiers.meta.IterativeClassifierOptimizer
weka.classifiers.meta.LogitBoost
weka.classifiers.meta.MetaCost
weka.classifiers.meta.MOA
weka.classifiers.meta.MultiBoostAB
weka.classifiers.meta.MultiClassClassifier
weka.classifiers.meta.MultiClassClassifierUpdateable
weka.classifiers.meta.MultiScheme
weka.classifiers.meta.MultiSearch
weka.classifiers.meta.nestedDichotomies.ClassBalancedND
weka.classifiers.meta.nestedDichotomies.DataNearBalancedND
weka.classifiers.meta.nestedDichotomies.FurthestCentroidND
weka.classifiers.meta.nestedDichotomies.ND
weka.classifiers.meta.nestedDichotomies.RandomPairND
weka.classifiers.meta.OneClassClassifier
weka.classifiers.meta.OrdinalClassClassifier
weka.classifiers.meta.RacedIncrementalLogitBoost
weka.classifiers.meta.RandomCommittee
weka.classifiers.meta.RandomizableFilteredClassifier
weka.classifiers.meta.RandomSubSpace
weka.classifiers.meta.RealAdaBoost
weka.classifiers.meta.RotationForest
weka.classifiers.meta.ThresholdSelector
weka.classifiers.meta.Vote
weka.classifiers.meta.WeightedInstancesHandlerWrapper
weka.classifiers.mi.CitationKNN
weka.classifiers.mi.MDD
weka.classifiers.mi.MIBoost
weka.classifiers.mi.MIDD
weka.classifiers.mi.MIEMDD
weka.classifiers.mi.MILR
weka.classifiers.mi.MINND
weka.classifiers.mi.MIOptimalBall
weka.classifiers.mi.MIRI
weka.classifiers.mi.MISMO
weka.classifiers.mi.MISVM
weka.classifiers.mi.MITI
weka.classifiers.mi.MIWrapper
weka.classifiers.mi.QuickDDIterative
weka.classifiers.mi.SimpleMI
weka.classifiers.mi.TLC
weka.classifiers.mi.TLD
weka.classifiers.mi.TLDSimple
weka.classifiers.misc.CHIRP
weka.classifiers.misc.FLR
weka.classifiers.misc.HyperPipes
weka.classifiers.misc.InputMappedClassifier
weka.classifiers.misc.IsolationForest
weka.classifiers.misc.LOF
weka.classifiers.misc.OSDL
weka.classifiers.misc.SerializedClassifier
weka.classifiers.misc.VFI
weka.classifiers.rules.ConjunctiveRule
weka.classifiers.rules.DecisionTable
weka.classifiers.rules.DTNB
weka.classifiers.rules.LAC
weka.classifiers.rules.M5Rules
weka.classifiers.rules.MODLEM
weka.classifiers.rules.MultiObjectiveEvolutionaryFuzzyClassifier
weka.classifiers.rules.NNge
weka.classifiers.rules.OLM
weka.classifiers.rules.OneR
weka.classifiers.rules.PART
weka.classifiers.rules.Prism
weka.classifiers.rules.Ridor
weka.classifiers.rules.RoughSet
weka.classifiers.rules.Vfdr
weka.classifiers.rules.ZeroR
weka.classifiers.scripting.GroovyClassifier
weka.classifiers.scripting.JythonClassifier
weka.classifiers.trees.ADTree
weka.classifiers.trees.AlternatingModelTree
weka.classifiers.trees.BFTree
weka.classifiers.trees.CDT
weka.classifiers.trees.DecisionStump
weka.classifiers.trees.ExtraTree
weka.classifiers.trees.FT
weka.classifiers.trees.HoeffdingTree
weka.classifiers.trees.Id3
weka.classifiers.trees.IsolationForest
weka.classifiers.trees.J48
weka.classifiers.trees.J48Consolidated
weka.classifiers.trees.J48graft
weka.classifiers.trees.LADTree
weka.classifiers.trees.LMT
weka.classifiers.trees.M5P
weka.classifiers.trees.NBTree
weka.classifiers.trees.RandomForest
weka.classifiers.trees.RandomTree
weka.classifiers.trees.REPTree
weka.classifiers.trees.SimpleCart
weka.classifiers.trees.UserClassifier



On 1/08/17, 2:59 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:

    Hi, Mark.
    Unfortunately neither the developer nor stable-3-8 branch snapshots as of July 31 work either with the weka.Run interface nor seem to load all the packages with
    weka.core.FindWithCapabilities
    I verified that my generic properties creator props file has UseDynamic=true set.
    my command lines are:
    java -Djava.awt.headless=true weka.Run weka.core.FindWithCapabilities -binary-class -numeric-atts -generic -superclass weka.classifiers.Classifier
    and
    sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -binary-class -numeric-atts -generic -superclass weka.classifiers.Classifier
   
    I'm using
    Java 1.8.0-141-B16
    on Centos 7
    if that helps.
   
    I'm not sure what's going on.  When I set
    java.awt.headless=true
    I get more errors from javax.
   
    For some reason, I get far fewer complaints using the developer branch snapshot.  In stable a lot of packages complain that they don't support Weka 3.8.2
    but neither snapshot seems to work with weka.Run or finds packages.
   
    Is there any further testing that I can do on my end?
    Thanks so much for working with this.
   
    Brad
   
   
   
    "Bradley E Harris" ---07/28/2017 10:33:10 AM---Hi, Mark. Thanks for the bug fix.  I'll test it on both stable and development
   
    From:        "Bradley E Harris" <[hidden email]>
    To:        "Weka machine learning workbench list." <[hidden email]>
    Date:        07/28/2017 10:33 AM
    Subject:        Re: [Wekalist] getting list of available classes including packages from command line
    Sent by:        [hidden email]
   
    ________________________________________
   
   
   
    Hi, Mark.
   
    Thanks for the bug fix. I'll test it on both stable and development branches and let you know. I definitely appreciate the fix. This one has bothered me ever since I couldn't figure out why my Java program didn't work. :)
   
    Also, thank you for implementing the CLI interface. This helps a lot. xvfb-run isn't difficult, but this makes things less resource intensive. :)
   
    Thanks,
    Brad
   
   
    Mark Hall ---07/27/2017 07:17:17 PM---Damn! I obviously didn't look too closely at the output generated by FindWithCapabilities :-) I've c
   
    From: Mark Hall <[hidden email]>
    To: "Weka machine learning workbench list." <[hidden email]>
    Date: 07/27/2017 07:17 PM
    Subject: Re: [Wekalist] getting list of available classes including packages from command line
    Sent by: [hidden email]
    ________________________________________
   
   
   
    Damn! I obviously didn't look too closely at the output generated by FindWithCapabilities :-) I've committed another fix to both trunk (3.9) and stable-3-8. FindWindCapabilities now uses WekaPackageClassloaderManager to instantiate potential matches instead of Class.forName() (which fails for package-based schemes). It also now implements CommandlineRunnable, so can be executed with weka.Run. The fix will be in the next nightly snapshot. Sorry for the confusion.
   
    Cheers,
    Mark.
   
    On 28/07/17, 5:51 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:
   
       Hi, Mark.
       
       I think I must be doing something wrong. I've downloaded 3.9.1, 3.8.1, stable-branch-3.8 and developer-branch
       and none of them seems to load the additional packages, even though the props file is set to UseDynamic=true
       Did I download the wrong branch or file?  I just finished testing both nightly snapshots.  I'm not sure what's going wrong.  Is it possible that the last snapshot was taken before you introduced the fix?  Did I download the wrong zip files?
       Do the packages lack the descriptor field that says, for example, that the package is a binary classifier?
       Perhaps it's loading packages and just not being able to match?
       
       On an odd note, weka.core.FindWithCapabilities doesn't work when preceeded by weka.Run
       
       Here is my command line:
       sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -binary-class -generic -superclass weka.classifiers.Classifier
       with $CLASSPATH set to
       /home/myuser/wekafiles/packages/snowball-stemmers/snowball-stemmers.jar:/home/myuser/bin/weka-stable-branch/weka/weka.jar
       
       Am I doing something wrong?
       
       Thanks,
       Brad
       
       
       Mark Hall ---07/26/2017 06:33:28 PM---The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trun
       
       From:        Mark Hall <[hidden email]>
       To:        "Weka machine learning workbench list." <[hidden email]>
       Date:        07/26/2017 06:33 PM
       Subject:        Re: [Wekalist] getting list of available classes including packages from command line
       Sent by:        [hidden email]
       
       ________________________________________
       
       
       
       The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trunk and stable-3-8 to rectify this. You can get the fix in the next nightly snapshot or from subversion. Thanks for the bug report.
       
       Cheers,
       Mark.
       
       On 27/07/17, 3:53 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:
       
           Hello, everyone.
           As a small adendum to my last post, I was able to get weka.core.FindWithCapabilities to print to the screen
           sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -superclass "weka.classifiers.Classifier" -generic
           
           lists all available classes.  I can also add things like
           -binary-class
           and filter that way.
           However, the problem from my last post remains.  Even though
           UseDynamic=true
           is set in the props file, the package-based classifiers still aren't being listed.
           
           Thanks,
           Brad Harris
           
           
           "Bradley E Harris" ---07/26/2017 10:44:16 AM---Hi, everyone. I am trying to get a list of all the available classes in weka including
           
           From:        "Bradley E Harris" <[hidden email]>
           To:        [hidden email]
           Date:        07/26/2017 10:44 AM
           Subject:        [Wekalist] getting list of available classes including packages        from command line
           Sent by:        [hidden email]
           
           ________________________________________
           
           
           
           Hi, everyone.
           
           I am trying to get a list of all the available classes in weka including the packages that I have added from the command line.
           I at first thought I could use weka.core.FindWithCapabilities, but there's no way to print out the results or write them to a file. I can get around the requirement for X11, but it has to have the ability to write to a file. So,
           I wrote a small java program that calls weka.gui.GenericPropertiesCreator, which is the suggestion I found on I believe an earlier post on this list. This is also the technique used by FindWithCapabilities.
           I am running on a headless display, and the code requires X11. So, to get around that I wrote the code to output to a file and used xvfb to run it. I used the GenericPropertiesCreator.props file from the weka src directory after verifying that it contained the
           UseDynamic=true
           statement, which is supposed to list items from all the loaded packages, or that's what I've read anyway.
           However, the generated file includes some packages but not others. For example, weka.classifiers.misc.IsolationForest doesn't show up in the resulting properties file. It also appears that NaiveBayesTree (or NBTree) is missing as well. However, things like AddativeRegression and MOA are there. My class path is set to point to weka.jar. Is weka not loading all available packages for some reason? I can, for example, access IsolationForest from the command line:
           java weka.Run weka.classifiers.misc.IsolationForest
           but it isn't in the generated properties file.
           Below is my java code. I have no clue how to write java, so I used a mixture of sample code, FindWithCapabilities.java and the documentation for weka.gui.GenericPropertiesCreator
           I'm sure I'm importing classes I don't need, but it doesn't seem to hurt it.
           It compiles with javac
           and, with my CLASSPATH variable set to point to weka.jar only it generates classifiers.properties with:
           sudo xvfb-run java list_classifiers
           
           ----------
           [myuser@localhost ~]$ more list_classifiers.java
           import weka.core.Capabilities.Capability;
           import weka.gui.GenericPropertiesCreator;
           
           import java.io.BufferedReader;
           import java.io.FileReader;
           import java.util.Enumeration;
           import java.util.Iterator;
           import java.util.Properties;
           import java.util.StringTokenizer;
           import java.util.Vector;
           public class list_classifiers {
           public static void main(String[] args) throws Exception {
           try {
           GenericPropertiesCreator creator;
           
           creator = new GenericPropertiesCreator("/home/myuser/GenericPropertiesCreator.props");
           creator.setExplicitPropsFile(true);
           creator.setOutputFilename("classifiers.properties");
           creator.execute(true, true);
           } catch(Exception e){
           }
           
           }
           }
           
           Does anyone know how to write out the rest of the available classifiers?
           
           Thanks,
           Brad Harris
           
           
           _______________________________________________
           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
       
       
       
       
       
       _______________________________________________
       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
   
   
   
   
    _______________________________________________
    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

Re: getting list of available classes including packages from command line

Bradley E Harris

Hi, Mark.
I unfortunately get totally different results from yours, and I'm not sure why. As you can see, X11 is still saying that it needs to start, and I'm not getting far enough to launch the class loader.
I'm using the July 31st snapshot of developer-branch
with openjdk 1.8.0-141
As you can see, it still looks like it's trying to start the GUI.
Am I doing something wrong?
Thanks,
Brad

Here is what I get with your command:
[myuser@localhost weka_output_files]$ java -Djava.awt.headless=true weka.Run .FindWithCapabilities -superclass weka.classifiers.Classifier -generic 2>&1
[Weka] RPlugin can't be loaded because the environment variable R_HOME is not set.
[Weka] RPlugin can't be loaded because the environment variable R_HOME is not set
[Weka] Integrity: removing classloader for: RPlugin
3D [dev] 1.6.0-pre12-daily-experimental daily

Exception in thread "main" java.lang.ExceptionInInitializerError
javax.media.j3d.NodeRetained.dirtyBoundsCache(NodeRetained.java:974)
javax.media.j3d.Shape3DRetained.setGeometry(Shape3DRetained.java:368)
javax.media.j3d.Shape3D.setGeometry(Shape3D.java:253)
com.sun.j3d.utils.geometry.Text2D.updateText2D(Text2D.java:223)
com.sun.j3d.utils.geometry.Text2D.<init>(Text2D.java:126)
weka.gui.visualize.VisualizePanel3D.<clinit>(VisualizePanel3D.java:569)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:348)
weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:198)
weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:178)
weka.core.ClassDiscovery.find(ClassDiscovery.java:247)
weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:615)
weka.core.converters.ConverterResources.initialize(ConverterResources.java:168)
weka.core.converters.ConverterUtils.initialize(ConverterUtils.java:688)
weka.core.converters.ConverterUtils.<clinit>(ConverterUtils.java:684)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:348)
weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:198)
weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:178)
weka.core.ClassDiscovery.find(ClassDiscovery.java:247)
weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
weka.gui.GenericPropertiesCreator.<clinit>(GenericPropertiesCreator.java:167)
weka.gui.GenericObjectEditor.determineClasses(GenericObjectEditor.java:200)
weka.gui.GenericObjectEditor.<clinit>(GenericObjectEditor.java:263)
weka.core.FindWithCapabilities.run(FindWithCapabilities.java:1058)
weka.Run.main(Run.java:349)

at javax.media.j3d.NodeRetained.dirtyBoundsCache(NodeRetained.java:974)
at javax.media.j3d.Shape3DRetained.setGeometry(Shape3DRetained.java:368)
at javax.media.j3d.Shape3D.setGeometry(Shape3D.java:253)
at com.sun.j3d.utils.geometry.Text2D.updateText2D(Text2D.java:223)
at com.sun.j3d.utils.geometry.Text2D.<init>(Text2D.java:126)
at weka.gui.visualize.VisualizePanel3D.<clinit>(VisualizePanel3D.java:569)
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.ClassDiscovery.find(ClassDiscovery.java:247)
at weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:615)
at weka.core.converters.ConverterResources.initialize(ConverterResources.java:168)
at weka.core.converters.ConverterUtils.initialize(ConverterUtils.java:688)
at weka.core.converters.ConverterUtils.<clinit>(ConverterUtils.java:684)
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.ClassDiscovery.find(ClassDiscovery.java:247)
at weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
at weka.gui.GenericPropertiesCreator.<clinit>(GenericPropertiesCreator.java:167)
at weka.gui.GenericObjectEditor.determineClasses(GenericObjectEditor.java:200)
at weka.gui.GenericObjectEditor.<clinit>(GenericObjectEditor.java:263)
at weka.core.FindWithCapabilities.run(FindWithCapabilities.java:1058)
at weka.Run.main(Run.java:349)
Caused by: java.awt.HeadlessException
at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:269)
... 29 more
[myuser@localhost weka_output_files]$

Inactive hide details for Mark Hall ---07/31/2017 05:55:47 PM---I've just checked the developer nightly snapshot and it is workMark Hall ---07/31/2017 05:55:47 PM---I've just checked the developer nightly snapshot and it is working for me on my Mac. You are correct

From: Mark Hall <[hidden email]>
To: "Weka machine learning workbench list." <[hidden email]>
Date: 07/31/2017 05:55 PM
Subject: Re: [Wekalist] getting list of available classes including packages from command line
Sent by: [hidden email]





I've just checked the developer nightly snapshot and it is working for me on my Mac. You are correct that there are some fatal exceptions generated when headless is set to true, but these appear to be only from the scatterPlot3D and associationRulesVisualizer packages for me, and stem from 3rd party libraries used therein (we have no control over that). There is also a harmless exception (warning?) from dl4j that I've omitted from the output below:

Selenium:weka mhall$ java -Djava.awt.headless=true -cp weka.jar weka.Run .FindWithCapabilities -superclass weka.classifiers.Classifier -generic
Getting parent classloader....
Injecting JRI classes into the root class loader...
Trying systemwide default location for R under Mac OS...
Trying to loaded R library from /Library/Frameworks/R.framework/Resources/library/rJava/jri/libjri.jnilib
Engine class: class org.rosuda.JRI.Rengine ClassLoader:sun.misc.Launcher$ExtClassLoader@7cc355be
Successfully loaded R library from /Library/Frameworks/R.framework/Resources/library/rJava/jri/libjri.jnilib
Getting REngine....
Setting a default package mirror in R...

Searching for the following Capabilities:
- allowed:
- not allowed: -

Found 163 classes that matched the criteria:

weka.classifiers.bayes.BayesianLogisticRegression
weka.classifiers.bayes.BayesNet
weka.classifiers.bayes.ComplementNaiveBayes
weka.classifiers.bayes.DMNBtext
weka.classifiers.bayes.HMM
weka.classifiers.bayes.HNB
weka.classifiers.bayes.NaiveBayes
weka.classifiers.bayes.NaiveBayesMultinomial
weka.classifiers.bayes.NaiveBayesMultinomialText
weka.classifiers.bayes.NaiveBayesMultinomialUpdateable
weka.classifiers.bayes.NaiveBayesSimple
weka.classifiers.bayes.NaiveBayesUpdateable
weka.classifiers.bayes.SparseGenerativeModel
weka.classifiers.functions.Dl4jMlpClassifier
weka.classifiers.functions.ElasticNet
weka.classifiers.functions.FLDA
weka.classifiers.functions.GaussianProcesses
weka.classifiers.functions.IsotonicRegression
weka.classifiers.functions.KernelLogisticRegression
weka.classifiers.functions.LDA
weka.classifiers.functions.LeastMedSq
weka.classifiers.functions.LibLINEAR
weka.classifiers.functions.LibSVM
weka.classifiers.functions.LinearRegression
weka.classifiers.functions.Logistic
weka.classifiers.functions.MLPClassifier
weka.classifiers.functions.MLPRegressor
weka.classifiers.functions.MultilayerPerceptron
weka.classifiers.functions.MultilayerPerceptronCS
weka.classifiers.functions.NonNegativeLogisticRegression
weka.classifiers.functions.PaceRegression
weka.classifiers.functions.PLSClassifier
weka.classifiers.functions.QDA
weka.classifiers.functions.RBFClassifier
weka.classifiers.functions.RBFNetwork
weka.classifiers.functions.RBFRegressor
weka.classifiers.functions.SGD
weka.classifiers.functions.SGDText
weka.classifiers.functions.SimpleLinearRegression
weka.classifiers.functions.SimpleLogistic
weka.classifiers.functions.SMO
weka.classifiers.functions.SMOreg
weka.classifiers.functions.SPegasos
weka.classifiers.functions.VotedPerceptron
weka.classifiers.functions.Winnow
weka.classifiers.lazy.AnalogicalModeling
weka.classifiers.lazy.IB1
weka.classifiers.lazy.IBk
weka.classifiers.lazy.IBkLG
weka.classifiers.lazy.KStar
weka.classifiers.lazy.LBR
weka.classifiers.lazy.LocalKnn
weka.classifiers.lazy.LWL
weka.classifiers.lazy.RseslibKnn
weka.classifiers.meta.AdaBoostM1
weka.classifiers.meta.AdditiveRegression
weka.classifiers.meta.AggregateableFilteredClassifier
weka.classifiers.meta.AggregateableFilteredClassifierUpdateable
weka.classifiers.meta.AttributeSelectedClassifier
weka.classifiers.meta.Bagging
weka.classifiers.meta.BatchPredictorVote
weka.classifiers.meta.ClassificationViaClustering
weka.classifiers.meta.ClassificationViaRegression
weka.classifiers.meta.CostSensitiveClassifier
weka.classifiers.meta.Dagging
weka.classifiers.meta.END
weka.classifiers.meta.EnsembleSelection
weka.classifiers.meta.FilteredClassifier
weka.classifiers.meta.FilteredClassifierUpdateable
weka.classifiers.meta.GridSearch
weka.classifiers.meta.IterativeAbsoluteErrorRegression
weka.classifiers.meta.IterativeClassifierOptimizer
weka.classifiers.meta.LogitBoost
weka.classifiers.meta.MetaCost
weka.classifiers.meta.MOA
weka.classifiers.meta.MultiBoostAB
weka.classifiers.meta.MultiClassClassifier
weka.classifiers.meta.MultiClassClassifierUpdateable
weka.classifiers.meta.MultiScheme
weka.classifiers.meta.MultiSearch
weka.classifiers.meta.nestedDichotomies.ClassBalancedND
weka.classifiers.meta.nestedDichotomies.DataNearBalancedND
weka.classifiers.meta.nestedDichotomies.FurthestCentroidND
weka.classifiers.meta.nestedDichotomies.ND
weka.classifiers.meta.nestedDichotomies.RandomPairND
weka.classifiers.meta.OneClassClassifier
weka.classifiers.meta.OrdinalClassClassifier
weka.classifiers.meta.RacedIncrementalLogitBoost
weka.classifiers.meta.RandomCommittee
weka.classifiers.meta.RandomizableFilteredClassifier
weka.classifiers.meta.RandomSubSpace
weka.classifiers.meta.RealAdaBoost
weka.classifiers.meta.RotationForest
weka.classifiers.meta.ThresholdSelector
weka.classifiers.meta.Vote
weka.classifiers.meta.WeightedInstancesHandlerWrapper
weka.classifiers.mi.CitationKNN
weka.classifiers.mi.MDD
weka.classifiers.mi.MIBoost
weka.classifiers.mi.MIDD
weka.classifiers.mi.MIEMDD
weka.classifiers.mi.MILR
weka.classifiers.mi.MINND
weka.classifiers.mi.MIOptimalBall
weka.classifiers.mi.MIRI
weka.classifiers.mi.MISMO
weka.classifiers.mi.MISVM
weka.classifiers.mi.MITI
weka.classifiers.mi.MIWrapper
weka.classifiers.mi.QuickDDIterative
weka.classifiers.mi.SimpleMI
weka.classifiers.mi.TLC
weka.classifiers.mi.TLD
weka.classifiers.mi.TLDSimple
weka.classifiers.misc.CHIRP
weka.classifiers.misc.FLR
weka.classifiers.misc.HyperPipes
weka.classifiers.misc.InputMappedClassifier
weka.classifiers.misc.IsolationForest
weka.classifiers.misc.LOF
weka.classifiers.misc.OSDL
weka.classifiers.misc.SerializedClassifier
weka.classifiers.misc.VFI
weka.classifiers.rules.ConjunctiveRule
weka.classifiers.rules.DecisionTable
weka.classifiers.rules.DTNB
weka.classifiers.rules.LAC
weka.classifiers.rules.M5Rules
weka.classifiers.rules.MODLEM
weka.classifiers.rules.MultiObjectiveEvolutionaryFuzzyClassifier
weka.classifiers.rules.NNge
weka.classifiers.rules.OLM
weka.classifiers.rules.OneR
weka.classifiers.rules.PART
weka.classifiers.rules.Prism
weka.classifiers.rules.Ridor
weka.classifiers.rules.RoughSet
weka.classifiers.rules.Vfdr
weka.classifiers.rules.ZeroR
weka.classifiers.scripting.GroovyClassifier
weka.classifiers.scripting.JythonClassifier
weka.classifiers.trees.ADTree
weka.classifiers.trees.AlternatingModelTree
weka.classifiers.trees.BFTree
weka.classifiers.trees.CDT
weka.classifiers.trees.DecisionStump
weka.classifiers.trees.ExtraTree
weka.classifiers.trees.FT
weka.classifiers.trees.HoeffdingTree
weka.classifiers.trees.Id3
weka.classifiers.trees.IsolationForest
weka.classifiers.trees.J48
weka.classifiers.trees.J48Consolidated
weka.classifiers.trees.J48graft
weka.classifiers.trees.LADTree
weka.classifiers.trees.LMT
weka.classifiers.trees.M5P
weka.classifiers.trees.NBTree
weka.classifiers.trees.RandomForest
weka.classifiers.trees.RandomTree
weka.classifiers.trees.REPTree
weka.classifiers.trees.SimpleCart
weka.classifiers.trees.UserClassifier



On 1/08/17, 2:59 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:

   Hi, Mark.
   Unfortunately neither the developer nor stable-3-8 branch snapshots as of July 31 work either with the weka.Run interface nor seem to load all the packages with
   weka.core.FindWithCapabilities
   I verified that my generic properties creator props file has UseDynamic=true set.
   my command lines are:
   java -Djava.awt.headless=true weka.Run weka.core.FindWithCapabilities -binary-class -numeric-atts -generic -superclass weka.classifiers.Classifier
   and
   sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -binary-class -numeric-atts -generic -superclass weka.classifiers.Classifier
   
   I'm using
   Java 1.8.0-141-B16
   on Centos 7
   if that helps.
   
   I'm not sure what's going on.  When I set
   java.awt.headless=true
   I get more errors from javax.
   
   For some reason, I get far fewer complaints using the developer branch snapshot.  In stable a lot of packages complain that they don't support Weka 3.8.2
   but neither snapshot seems to work with weka.Run or finds packages.
   
   Is there any further testing that I can do on my end?
   Thanks so much for working with this.
   
   Brad
   
   
   
   "Bradley E Harris" ---07/28/2017 10:33:10 AM---Hi, Mark. Thanks for the bug fix.  I'll test it on both stable and development
   
   From:        "Bradley E Harris" <[hidden email]>
   To:        "Weka machine learning workbench list." <[hidden email]>
   Date:        07/28/2017 10:33 AM
   Subject:        Re: [Wekalist] getting list of available classes including packages from command line
   Sent by:        [hidden email]
   
   ________________________________________
   
   
   
   Hi, Mark.
   
   Thanks for the bug fix. I'll test it on both stable and development branches and let you know. I definitely appreciate the fix. This one has bothered me ever since I couldn't figure out why my Java program didn't work. :)
   
   Also, thank you for implementing the CLI interface. This helps a lot. xvfb-run isn't difficult, but this makes things less resource intensive. :)
   
   Thanks,
   Brad
   
   
   Mark Hall ---07/27/2017 07:17:17 PM---Damn! I obviously didn't look too closely at the output generated by FindWithCapabilities :-) I've c
   
   From: Mark Hall <[hidden email]>
   To: "Weka machine learning workbench list." <[hidden email]>
   Date: 07/27/2017 07:17 PM
   Subject: Re: [Wekalist] getting list of available classes including packages from command line
   Sent by: [hidden email]
   ________________________________________
   
   
   
   Damn! I obviously didn't look too closely at the output generated by FindWithCapabilities :-) I've committed another fix to both trunk (3.9) and stable-3-8. FindWindCapabilities now uses WekaPackageClassloaderManager to instantiate potential matches instead of Class.forName() (which fails for package-based schemes). It also now implements CommandlineRunnable, so can be executed with weka.Run. The fix will be in the next nightly snapshot. Sorry for the confusion.
   
   Cheers,
   Mark.
   
   On 28/07/17, 5:51 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:
   
      Hi, Mark.
     
      I think I must be doing something wrong. I've downloaded 3.9.1, 3.8.1, stable-branch-3.8 and developer-branch
      and none of them seems to load the additional packages, even though the props file is set to UseDynamic=true
      Did I download the wrong branch or file?  I just finished testing both nightly snapshots.  I'm not sure what's going wrong.  Is it possible that the last snapshot was taken before you introduced the fix?  Did I download the wrong zip files?
      Do the packages lack the descriptor field that says, for example, that the package is a binary classifier?
      Perhaps it's loading packages and just not being able to match?
     
      On an odd note, weka.core.FindWithCapabilities doesn't work when preceeded by weka.Run
     
      Here is my command line:
      sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -binary-class -generic -superclass weka.classifiers.Classifier
      with $CLASSPATH set to
      /home/myuser/wekafiles/packages/snowball-stemmers/snowball-stemmers.jar:/home/myuser/bin/weka-stable-branch/weka/weka.jar
     
      Am I doing something wrong?
     
      Thanks,
      Brad
     
     
      Mark Hall ---07/26/2017 06:33:28 PM---The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trun
     
      From:        Mark Hall <[hidden email]>
      To:        "Weka machine learning workbench list." <[hidden email]>
      Date:        07/26/2017 06:33 PM
      Subject:        Re: [Wekalist] getting list of available classes including packages from command line
      Sent by:        [hidden email]
     
      ________________________________________
     
     
     
      The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trunk and stable-3-8 to rectify this. You can get the fix in the next nightly snapshot or from subversion. Thanks for the bug report.
     
      Cheers,
      Mark.
     
      On 27/07/17, 3:53 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:
     
          Hello, everyone.
          As a small adendum to my last post, I was able to get weka.core.FindWithCapabilities to print to the screen
          sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -superclass "weka.classifiers.Classifier" -generic
         
          lists all available classes.  I can also add things like
          -binary-class
          and filter that way.
          However, the problem from my last post remains.  Even though
          UseDynamic=true
          is set in the props file, the package-based classifiers still aren't being listed.
         
          Thanks,
          Brad Harris
         
         
          "Bradley E Harris" ---07/26/2017 10:44:16 AM---Hi, everyone. I am trying to get a list of all the available classes in weka including
         
          From:        "Bradley E Harris" <[hidden email]>
          To:        [hidden email]
          Date:        07/26/2017 10:44 AM
          Subject:        [Wekalist] getting list of available classes including packages        from command line
          Sent by:        [hidden email]
         
          ________________________________________
         
         
         
          Hi, everyone.
         
          I am trying to get a list of all the available classes in weka including the packages that I have added from the command line.
          I at first thought I could use weka.core.FindWithCapabilities, but there's no way to print out the results or write them to a file. I can get around the requirement for X11, but it has to have the ability to write to a file. So,
          I wrote a small java program that calls weka.gui.GenericPropertiesCreator, which is the suggestion I found on I believe an earlier post on this list. This is also the technique used by FindWithCapabilities.
          I am running on a headless display, and the code requires X11. So, to get around that I wrote the code to output to a file and used xvfb to run it. I used the GenericPropertiesCreator.props file from the weka src directory after verifying that it contained the
          UseDynamic=true
          statement, which is supposed to list items from all the loaded packages, or that's what I've read anyway.
          However, the generated file includes some packages but not others. For example, weka.classifiers.misc.IsolationForest doesn't show up in the resulting properties file. It also appears that NaiveBayesTree (or NBTree) is missing as well. However, things like AddativeRegression and MOA are there. My class path is set to point to weka.jar. Is weka not loading all available packages for some reason? I can, for example, access IsolationForest from the command line:
          java weka.Run weka.classifiers.misc.IsolationForest
          but it isn't in the generated properties file.
          Below is my java code. I have no clue how to write java, so I used a mixture of sample code, FindWithCapabilities.java and the documentation for weka.gui.GenericPropertiesCreator
          I'm sure I'm importing classes I don't need, but it doesn't seem to hurt it.
          It compiles with javac
          and, with my CLASSPATH variable set to point to weka.jar only it generates classifiers.properties with:
          sudo xvfb-run java list_classifiers
         
          ----------
          [myuser@localhost ~]$ more list_classifiers.java
          import weka.core.Capabilities.Capability;
          import weka.gui.GenericPropertiesCreator;
         
          import java.io.BufferedReader;
          import java.io.FileReader;
          import java.util.Enumeration;
          import java.util.Iterator;
          import java.util.Properties;
          import java.util.StringTokenizer;
          import java.util.Vector;
          public class list_classifiers {
          public static void main(String[] args) throws Exception {
          try {
          GenericPropertiesCreator creator;
         
          creator = new GenericPropertiesCreator("/home/myuser/GenericPropertiesCreator.props");
          creator.setExplicitPropsFile(true);
          creator.setOutputFilename("classifiers.properties");
          creator.execute(true, true);
          } catch(Exception e){
          }
         
          }
          }
         
          Does anyone know how to write out the rest of the available classifiers?
         
          Thanks,
          Brad Harris
         
         
          _______________________________________________
          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
     
     
     
     
     
      _______________________________________________
      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
   
   
   
   
   _______________________________________________
   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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: getting list of available classes including packages from command line

Bradley E Harris
In reply to this post by Mark Hall

As another note,
when I run:
sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -superclass weka.classifiers.Classifier -generic
I get 52 classes. For example, I don't get DMNBtext even though I've already built models with it.

Thanks,
Brad


Inactive hide details for "Bradley E Harris" ---08/01/2017 01:48:51 PM---Hi, Mark. I unfortunately get totally different result"Bradley E Harris" ---08/01/2017 01:48:51 PM---Hi, Mark. I unfortunately get totally different results from yours, and I'm not sure

From: "Bradley E Harris" <[hidden email]>
To: "Weka machine learning workbench list." <[hidden email]>
Date: 08/01/2017 01:48 PM
Subject: Re: [Wekalist] getting list of available classes including packages from command line
Sent by: [hidden email]





Hi, Mark.
I unfortunately get totally different results from yours, and I'm not sure why. As you can see, X11 is still saying that it needs to start, and I'm not getting far enough to launch the class loader.
I'm using the July 31st snapshot of developer-branch
with openjdk 1.8.0-141
As you can see, it still looks like it's trying to start the GUI.
Am I doing something wrong?
Thanks,
Brad


Here is what I get with your command:
[myuser@localhost weka_output_files]$ java -Djava.awt.headless=true weka.Run .FindWithCapabilities -superclass weka.classifiers.Classifier -generic 2>&1
[Weka] RPlugin can't be loaded because the environment variable R_HOME is not set.
[Weka] RPlugin can't be loaded because the environment variable R_HOME is not set
[Weka] Integrity: removing classloader for: RPlugin
3D [dev] 1.6.0-pre12-daily-experimental daily


Exception in thread "main" java.lang.ExceptionInInitializerError
javax.media.j3d.NodeRetained.dirtyBoundsCache(NodeRetained.java:974)
javax.media.j3d.Shape3DRetained.setGeometry(Shape3DRetained.java:368)
javax.media.j3d.Shape3D.setGeometry(Shape3D.java:253)
com.sun.j3d.utils.geometry.Text2D.updateText2D(Text2D.java:223)
com.sun.j3d.utils.geometry.Text2D.<init>(Text2D.java:126)
weka.gui.visualize.VisualizePanel3D.<clinit>(VisualizePanel3D.java:569)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:348)
weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:198)
weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:178)
weka.core.ClassDiscovery.find(ClassDiscovery.java:247)
weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:615)
weka.core.converters.ConverterResources.initialize(ConverterResources.java:168)
weka.core.converters.ConverterUtils.initialize(ConverterUtils.java:688)
weka.core.converters.ConverterUtils.<clinit>(ConverterUtils.java:684)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:348)
weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:198)
weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:178)
weka.core.ClassDiscovery.find(ClassDiscovery.java:247)
weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
weka.gui.GenericPropertiesCreator.<clinit>(GenericPropertiesCreator.java:167)
weka.gui.GenericObjectEditor.determineClasses(GenericObjectEditor.java:200)
weka.gui.GenericObjectEditor.<clinit>(GenericObjectEditor.java:263)
weka.core.FindWithCapabilities.run(FindWithCapabilities.java:1058)
weka.Run.main(Run.java:349)


at javax.media.j3d.NodeRetained.dirtyBoundsCache(NodeRetained.java:974)
at javax.media.j3d.Shape3DRetained.setGeometry(Shape3DRetained.java:368)
at javax.media.j3d.Shape3D.setGeometry(Shape3D.java:253)
at com.sun.j3d.utils.geometry.Text2D.updateText2D(Text2D.java:223)
at com.sun.j3d.utils.geometry.Text2D.<init>(Text2D.java:126)
at weka.gui.visualize.VisualizePanel3D.<clinit>(VisualizePanel3D.java:569)
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.ClassDiscovery.find(ClassDiscovery.java:247)
at weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:615)
at weka.core.converters.ConverterResources.initialize(ConverterResources.java:168)
at weka.core.converters.ConverterUtils.initialize(ConverterUtils.java:688)
at weka.core.converters.ConverterUtils.<clinit>(ConverterUtils.java:684)
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.ClassDiscovery.find(ClassDiscovery.java:247)
at weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
at weka.gui.GenericPropertiesCreator.<clinit>(GenericPropertiesCreator.java:167)
at weka.gui.GenericObjectEditor.determineClasses(GenericObjectEditor.java:200)
at weka.gui.GenericObjectEditor.<clinit>(GenericObjectEditor.java:263)
at weka.core.FindWithCapabilities.run(FindWithCapabilities.java:1058)
at weka.Run.main(Run.java:349)
Caused by: java.awt.HeadlessException
at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:269)
... 29 more
[myuser@localhost weka_output_files]$


Inactive hide details for Mark Hall ---07/31/2017 05:55:47 PM---I've just checked the developer nightly snapshot and it is workMark Hall ---07/31/2017 05:55:47 PM---I've just checked the developer nightly snapshot and it is working for me on my Mac. You are correct

From:
Mark Hall <[hidden email]>
To:
"Weka machine learning workbench list." <[hidden email]>
Date:
07/31/2017 05:55 PM
Subject:
Re: [Wekalist] getting list of available classes including packages from command line
Sent by:
[hidden email]




I've just checked the developer nightly snapshot and it is working for me on my Mac. You are correct that there are some fatal exceptions generated when headless is set to true, but these appear to be only from the scatterPlot3D and associationRulesVisualizer packages for me, and stem from 3rd party libraries used therein (we have no control over that). There is also a harmless exception (warning?) from dl4j that I've omitted from the output below:

Selenium:weka mhall$ java -Djava.awt.headless=true -cp weka.jar weka.Run .FindWithCapabilities -superclass weka.classifiers.Classifier -generic
Getting parent classloader....
Injecting JRI classes into the root class loader...
Trying systemwide default location for R under Mac OS...
Trying to loaded R library from /Library/Frameworks/R.framework/Resources/library/rJava/jri/libjri.jnilib
Engine class: class org.rosuda.JRI.Rengine ClassLoader:sun.misc.Launcher$ExtClassLoader@7cc355be
Successfully loaded R library from /Library/Frameworks/R.framework/Resources/library/rJava/jri/libjri.jnilib
Getting REngine....
Setting a default package mirror in R...

Searching for the following Capabilities:
- allowed:
- not allowed: -

Found 163 classes that matched the criteria:

weka.classifiers.bayes.BayesianLogisticRegression
weka.classifiers.bayes.BayesNet
weka.classifiers.bayes.ComplementNaiveBayes
weka.classifiers.bayes.DMNBtext
weka.classifiers.bayes.HMM
weka.classifiers.bayes.HNB
weka.classifiers.bayes.NaiveBayes
weka.classifiers.bayes.NaiveBayesMultinomial
weka.classifiers.bayes.NaiveBayesMultinomialText
weka.classifiers.bayes.NaiveBayesMultinomialUpdateable
weka.classifiers.bayes.NaiveBayesSimple
weka.classifiers.bayes.NaiveBayesUpdateable
weka.classifiers.bayes.SparseGenerativeModel
weka.classifiers.functions.Dl4jMlpClassifier
weka.classifiers.functions.ElasticNet
weka.classifiers.functions.FLDA
weka.classifiers.functions.GaussianProcesses
weka.classifiers.functions.IsotonicRegression
weka.classifiers.functions.KernelLogisticRegression
weka.classifiers.functions.LDA
weka.classifiers.functions.LeastMedSq
weka.classifiers.functions.LibLINEAR
weka.classifiers.functions.LibSVM
weka.classifiers.functions.LinearRegression
weka.classifiers.functions.Logistic
weka.classifiers.functions.MLPClassifier
weka.classifiers.functions.MLPRegressor
weka.classifiers.functions.MultilayerPerceptron
weka.classifiers.functions.MultilayerPerceptronCS
weka.classifiers.functions.NonNegativeLogisticRegression
weka.classifiers.functions.PaceRegression
weka.classifiers.functions.PLSClassifier
weka.classifiers.functions.QDA
weka.classifiers.functions.RBFClassifier
weka.classifiers.functions.RBFNetwork
weka.classifiers.functions.RBFRegressor
weka.classifiers.functions.SGD
weka.classifiers.functions.SGDText
weka.classifiers.functions.SimpleLinearRegression
weka.classifiers.functions.SimpleLogistic
weka.classifiers.functions.SMO
weka.classifiers.functions.SMOreg
weka.classifiers.functions.SPegasos
weka.classifiers.functions.VotedPerceptron
weka.classifiers.functions.Winnow
weka.classifiers.lazy.AnalogicalModeling
weka.classifiers.lazy.IB1
weka.classifiers.lazy.IBk
weka.classifiers.lazy.IBkLG
weka.classifiers.lazy.KStar
weka.classifiers.lazy.LBR
weka.classifiers.lazy.LocalKnn
weka.classifiers.lazy.LWL
weka.classifiers.lazy.RseslibKnn
weka.classifiers.meta.AdaBoostM1
weka.classifiers.meta.AdditiveRegression
weka.classifiers.meta.AggregateableFilteredClassifier
weka.classifiers.meta.AggregateableFilteredClassifierUpdateable
weka.classifiers.meta.AttributeSelectedClassifier
weka.classifiers.meta.Bagging
weka.classifiers.meta.BatchPredictorVote
weka.classifiers.meta.ClassificationViaClustering
weka.classifiers.meta.ClassificationViaRegression
weka.classifiers.meta.CostSensitiveClassifier
weka.classifiers.meta.Dagging
weka.classifiers.meta.END
weka.classifiers.meta.EnsembleSelection
weka.classifiers.meta.FilteredClassifier
weka.classifiers.meta.FilteredClassifierUpdateable
weka.classifiers.meta.GridSearch
weka.classifiers.meta.IterativeAbsoluteErrorRegression
weka.classifiers.meta.IterativeClassifierOptimizer
weka.classifiers.meta.LogitBoost
weka.classifiers.meta.MetaCost
weka.classifiers.meta.MOA
weka.classifiers.meta.MultiBoostAB
weka.classifiers.meta.MultiClassClassifier
weka.classifiers.meta.MultiClassClassifierUpdateable
weka.classifiers.meta.MultiScheme
weka.classifiers.meta.MultiSearch
weka.classifiers.meta.nestedDichotomies.ClassBalancedND
weka.classifiers.meta.nestedDichotomies.DataNearBalancedND
weka.classifiers.meta.nestedDichotomies.FurthestCentroidND
weka.classifiers.meta.nestedDichotomies.ND
weka.classifiers.meta.nestedDichotomies.RandomPairND
weka.classifiers.meta.OneClassClassifier
weka.classifiers.meta.OrdinalClassClassifier
weka.classifiers.meta.RacedIncrementalLogitBoost
weka.classifiers.meta.RandomCommittee
weka.classifiers.meta.RandomizableFilteredClassifier
weka.classifiers.meta.RandomSubSpace
weka.classifiers.meta.RealAdaBoost
weka.classifiers.meta.RotationForest
weka.classifiers.meta.ThresholdSelector
weka.classifiers.meta.Vote
weka.classifiers.meta.WeightedInstancesHandlerWrapper
weka.classifiers.mi.CitationKNN
weka.classifiers.mi.MDD
weka.classifiers.mi.MIBoost
weka.classifiers.mi.MIDD
weka.classifiers.mi.MIEMDD
weka.classifiers.mi.MILR
weka.classifiers.mi.MINND
weka.classifiers.mi.MIOptimalBall
weka.classifiers.mi.MIRI
weka.classifiers.mi.MISMO
weka.classifiers.mi.MISVM
weka.classifiers.mi.MITI
weka.classifiers.mi.MIWrapper
weka.classifiers.mi.QuickDDIterative
weka.classifiers.mi.SimpleMI
weka.classifiers.mi.TLC
weka.classifiers.mi.TLD
weka.classifiers.mi.TLDSimple
weka.classifiers.misc.CHIRP
weka.classifiers.misc.FLR
weka.classifiers.misc.HyperPipes
weka.classifiers.misc.InputMappedClassifier
weka.classifiers.misc.IsolationForest
weka.classifiers.misc.LOF
weka.classifiers.misc.OSDL
weka.classifiers.misc.SerializedClassifier
weka.classifiers.misc.VFI
weka.classifiers.rules.ConjunctiveRule
weka.classifiers.rules.DecisionTable
weka.classifiers.rules.DTNB
weka.classifiers.rules.LAC
weka.classifiers.rules.M5Rules
weka.classifiers.rules.MODLEM
weka.classifiers.rules.MultiObjectiveEvolutionaryFuzzyClassifier
weka.classifiers.rules.NNge
weka.classifiers.rules.OLM
weka.classifiers.rules.OneR
weka.classifiers.rules.PART
weka.classifiers.rules.Prism
weka.classifiers.rules.Ridor
weka.classifiers.rules.RoughSet
weka.classifiers.rules.Vfdr
weka.classifiers.rules.ZeroR
weka.classifiers.scripting.GroovyClassifier
weka.classifiers.scripting.JythonClassifier
weka.classifiers.trees.ADTree
weka.classifiers.trees.AlternatingModelTree
weka.classifiers.trees.BFTree
weka.classifiers.trees.CDT
weka.classifiers.trees.DecisionStump
weka.classifiers.trees.ExtraTree
weka.classifiers.trees.FT
weka.classifiers.trees.HoeffdingTree
weka.classifiers.trees.Id3
weka.classifiers.trees.IsolationForest
weka.classifiers.trees.J48
weka.classifiers.trees.J48Consolidated
weka.classifiers.trees.J48graft
weka.classifiers.trees.LADTree
weka.classifiers.trees.LMT
weka.classifiers.trees.M5P
weka.classifiers.trees.NBTree
weka.classifiers.trees.RandomForest
weka.classifiers.trees.RandomTree
weka.classifiers.trees.REPTree
weka.classifiers.trees.SimpleCart
weka.classifiers.trees.UserClassifier



On 1/08/17, 2:59 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:

  Hi, Mark.
  Unfortunately neither the developer nor stable-3-8 branch snapshots as of July 31 work either with the weka.Run interface nor seem to load all the packages with
  weka.core.FindWithCapabilities
  I verified that my generic properties creator props file has UseDynamic=true set.
  my command lines are:
  java -Djava.awt.headless=true weka.Run weka.core.FindWithCapabilities -binary-class -numeric-atts -generic -superclass weka.classifiers.Classifier
  and
  sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -binary-class -numeric-atts -generic -superclass weka.classifiers.Classifier
 
  I'm using
  Java 1.8.0-141-B16
  on Centos 7
  if that helps.
 
  I'm not sure what's going on.  When I set
  java.awt.headless=true
  I get more errors from javax.
 
  For some reason, I get far fewer complaints using the developer branch snapshot.  In stable a lot of packages complain that they don't support Weka 3.8.2
  but neither snapshot seems to work with weka.Run or finds packages.
 
  Is there any further testing that I can do on my end?
  Thanks so much for working with this.
 
  Brad
 
 
 
  "Bradley E Harris" ---07/28/2017 10:33:10 AM---Hi, Mark. Thanks for the bug fix.  I'll test it on both stable and development
 
  From:        "Bradley E Harris" <[hidden email]>
  To:        "Weka machine learning workbench list." <[hidden email]>
  Date:        07/28/2017 10:33 AM
  Subject:        Re: [Wekalist] getting list of available classes including packages from command line
  Sent by:        [hidden email]
 
  ________________________________________
 
 
 
  Hi, Mark.
 
  Thanks for the bug fix. I'll test it on both stable and development branches and let you know. I definitely appreciate the fix. This one has bothered me ever since I couldn't figure out why my Java program didn't work. :)
 
  Also, thank you for implementing the CLI interface. This helps a lot. xvfb-run isn't difficult, but this makes things less resource intensive. :)
 
  Thanks,
  Brad
 
 
  Mark Hall ---07/27/2017 07:17:17 PM---Damn! I obviously didn't look too closely at the output generated by FindWithCapabilities :-) I've c
 
  From: Mark Hall <[hidden email]>
  To: "Weka machine learning workbench list." <[hidden email]>
  Date: 07/27/2017 07:17 PM
  Subject: Re: [Wekalist] getting list of available classes including packages from command line
  Sent by: [hidden email]
  ________________________________________
 
 
 
  Damn! I obviously didn't look too closely at the output generated by FindWithCapabilities :-) I've committed another fix to both trunk (3.9) and stable-3-8. FindWindCapabilities now uses WekaPackageClassloaderManager to instantiate potential matches instead of Class.forName() (which fails for package-based schemes). It also now implements CommandlineRunnable, so can be executed with weka.Run. The fix will be in the next nightly snapshot. Sorry for the confusion.
 
  Cheers,
  Mark.
 
  On 28/07/17, 5:51 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:
 
     Hi, Mark.
     
     I think I must be doing something wrong. I've downloaded 3.9.1, 3.8.1, stable-branch-3.8 and developer-branch
     and none of them seems to load the additional packages, even though the props file is set to UseDynamic=true
     Did I download the wrong branch or file?  I just finished testing both nightly snapshots.  I'm not sure what's going wrong.  Is it possible that the last snapshot was taken before you introduced the fix?  Did I download the wrong zip files?
     Do the packages lack the descriptor field that says, for example, that the package is a binary classifier?
     Perhaps it's loading packages and just not being able to match?
     
     On an odd note, weka.core.FindWithCapabilities doesn't work when preceeded by weka.Run
     
     Here is my command line:
     sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -binary-class -generic -superclass weka.classifiers.Classifier
     with $CLASSPATH set to
     /home/myuser/wekafiles/packages/snowball-stemmers/snowball-stemmers.jar:/home/myuser/bin/weka-stable-branch/weka/weka.jar
     
     Am I doing something wrong?
     
     Thanks,
     Brad
     
     
     Mark Hall ---07/26/2017 06:33:28 PM---The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trun
     
     From:        Mark Hall <[hidden email]>
     To:        "Weka machine learning workbench list." <[hidden email]>
     Date:        07/26/2017 06:33 PM
     Subject:        Re: [Wekalist] getting list of available classes including packages from command line
     Sent by:        [hidden email]
     
     ________________________________________
     
     
     
     The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trunk and stable-3-8 to rectify this. You can get the fix in the next nightly snapshot or from subversion. Thanks for the bug report.
     
     Cheers,
     Mark.
     
     On 27/07/17, 3:53 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:
     
         Hello, everyone.
         As a small adendum to my last post, I was able to get weka.core.FindWithCapabilities to print to the screen
         sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -superclass "weka.classifiers.Classifier" -generic
         
         lists all available classes.  I can also add things like
         -binary-class
         and filter that way.
         However, the problem from my last post remains.  Even though
         UseDynamic=true
         is set in the props file, the package-based classifiers still aren't being listed.
         
         Thanks,
         Brad Harris
         
         
         "Bradley E Harris" ---07/26/2017 10:44:16 AM---Hi, everyone. I am trying to get a list of all the available classes in weka including
         
         From:        "Bradley E Harris" <[hidden email]>
         To:        [hidden email]
         Date:        07/26/2017 10:44 AM
         Subject:        [Wekalist] getting list of available classes including packages        from command line
         Sent by:        [hidden email]
         
         ________________________________________
         
         
         
         Hi, everyone.
         
         I am trying to get a list of all the available classes in weka including the packages that I have added from the command line.
         I at first thought I could use weka.core.FindWithCapabilities, but there's no way to print out the results or write them to a file. I can get around the requirement for X11, but it has to have the ability to write to a file. So,
         I wrote a small java program that calls weka.gui.GenericPropertiesCreator, which is the suggestion I found on I believe an earlier post on this list. This is also the technique used by FindWithCapabilities.
         I am running on a headless display, and the code requires X11. So, to get around that I wrote the code to output to a file and used xvfb to run it. I used the GenericPropertiesCreator.props file from the weka src directory after verifying that it contained the
         UseDynamic=true
         statement, which is supposed to list items from all the loaded packages, or that's what I've read anyway.
         However, the generated file includes some packages but not others. For example, weka.classifiers.misc.IsolationForest doesn't show up in the resulting properties file. It also appears that NaiveBayesTree (or NBTree) is missing as well. However, things like AddativeRegression and MOA are there. My class path is set to point to weka.jar. Is weka not loading all available packages for some reason? I can, for example, access IsolationForest from the command line:
         java weka.Run weka.classifiers.misc.IsolationForest
         but it isn't in the generated properties file.
         Below is my java code. I have no clue how to write java, so I used a mixture of sample code, FindWithCapabilities.java and the documentation for weka.gui.GenericPropertiesCreator
         I'm sure I'm importing classes I don't need, but it doesn't seem to hurt it.
         It compiles with javac
         and, with my CLASSPATH variable set to point to weka.jar only it generates classifiers.properties with:
         sudo xvfb-run java list_classifiers
         
         ----------
         [myuser@localhost ~]$ more list_classifiers.java
         import weka.core.Capabilities.Capability;
         import weka.gui.GenericPropertiesCreator;
         
         import java.io.BufferedReader;
         import java.io.FileReader;
         import java.util.Enumeration;
         import java.util.Iterator;
         import java.util.Properties;
         import java.util.StringTokenizer;
         import java.util.Vector;
         public class list_classifiers {
         public static void main(String[] args) throws Exception {
         try {
         GenericPropertiesCreator creator;
         
         creator = new GenericPropertiesCreator("/home/myuser/GenericPropertiesCreator.props");
         creator.setExplicitPropsFile(true);
         creator.setOutputFilename("classifiers.properties");
         creator.execute(true, true);
         } catch(Exception e){
         }
         
         }
         }
         
         Does anyone know how to write out the rest of the available classifiers?
         
         Thanks,
         Brad Harris
         
         
         _______________________________________________
         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
     
     
     
     
     
     _______________________________________________
     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
 
 
 
 
  _______________________________________________
  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




_______________________________________________
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: getting list of available classes including packages from command line

Eibe Frank-3
In reply to this post by Bradley E Harris
It looks like the issue is due to the 3D scatter plot package. Just uninstall that package (or disable loading).

Cheers,
Eibe

On Wed, 2 Aug 2017 at 5:48 AM, Bradley E Harris <[hidden email]> wrote:

Hi, Mark.
I unfortunately get totally different results from yours, and I'm not sure why. As you can see, X11 is still saying that it needs to start, and I'm not getting far enough to launch the class loader.
I'm using the July 31st snapshot of developer-branch
with openjdk 1.8.0-141
As you can see, it still looks like it's trying to start the GUI.


Am I doing something wrong?
Thanks,
Brad

Here is what I get with your command:
[myuser@localhost weka_output_files]$ java -Djava.awt.headless=true weka.Run .FindWithCapabilities -superclass weka.classifiers.Classifier -generic 2>&1
[Weka] RPlugin can't be loaded because the environment variable R_HOME is not set.
[Weka] RPlugin can't be loaded because the environment variable R_HOME is not set
[Weka] Integrity: removing classloader for: RPlugin
3D [dev] 1.6.0-pre12-daily-experimental daily

Exception in thread "main" java.lang.ExceptionInInitializerError
javax.media.j3d.NodeRetained.dirtyBoundsCache(NodeRetained.java:974)
javax.media.j3d.Shape3DRetained.setGeometry(Shape3DRetained.java:368)
javax.media.j3d.Shape3D.setGeometry(Shape3D.java:253)
com.sun.j3d.utils.geometry.Text2D.updateText2D(Text2D.java:223)
com.sun.j3d.utils.geometry.Text2D.<init>(Text2D.java:126)
weka.gui.visualize.VisualizePanel3D.<clinit>(VisualizePanel3D.java:569)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:348)
weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:198)
weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:178)
weka.core.ClassDiscovery.find(ClassDiscovery.java:247)
weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:615)
weka.core.converters.ConverterResources.initialize(ConverterResources.java:168)
weka.core.converters.ConverterUtils.initialize(ConverterUtils.java:688)
weka.core.converters.ConverterUtils.<clinit>(ConverterUtils.java:684)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:348)
weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:198)
weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:178)
weka.core.ClassDiscovery.find(ClassDiscovery.java:247)
weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
weka.gui.GenericPropertiesCreator.<clinit>(GenericPropertiesCreator.java:167)
weka.gui.GenericObjectEditor.determineClasses(GenericObjectEditor.java:200)
weka.gui.GenericObjectEditor.<clinit>(GenericObjectEditor.java:263)
weka.core.FindWithCapabilities.run(FindWithCapabilities.java:1058)
weka.Run.main(Run.java:349)

at javax.media.j3d.NodeRetained.dirtyBoundsCache(NodeRetained.java:974)
at javax.media.j3d.Shape3DRetained.setGeometry(Shape3DRetained.java:368)
at javax.media.j3d.Shape3D.setGeometry(Shape3D.java:253)
at com.sun.j3d.utils.geometry.Text2D.updateText2D(Text2D.java:223)
at com.sun.j3d.utils.geometry.Text2D.<init>(Text2D.java:126)
at weka.gui.visualize.VisualizePanel3D.<clinit>(VisualizePanel3D.java:569)
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.ClassDiscovery.find(ClassDiscovery.java:247)
at weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:615)
at weka.core.converters.ConverterResources.initialize(ConverterResources.java:168)
at weka.core.converters.ConverterUtils.initialize(ConverterUtils.java:688)
at weka.core.converters.ConverterUtils.<clinit>(ConverterUtils.java:684)
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.ClassDiscovery.find(ClassDiscovery.java:247)
at weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
at weka.gui.GenericPropertiesCreator.<clinit>(GenericPropertiesCreator.java:167)
at weka.gui.GenericObjectEditor.determineClasses(GenericObjectEditor.java:200)
at weka.gui.GenericObjectEditor.<clinit>(GenericObjectEditor.java:263)
at weka.core.FindWithCapabilities.run(FindWithCapabilities.java:1058)
at weka.Run.main(Run.java:349)
Caused by: java.awt.HeadlessException
at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:269)
... 29 more
[myuser@localhost weka_output_files]$

Mark Hall ---07/31/2017 05:55:47 PM---I've just checked the developer nightly snapshot and it is working for me on my Mac. You are correct



From: Mark Hall <[hidden email]>
To: "Weka machine learning workbench list." <[hidden email]>

Date: 07/31/2017 05:55 PM
Subject: Re: [Wekalist] getting list of available classes including packages from command line


Sent by: [hidden email]





I've just checked the developer nightly snapshot and it is working for me on my Mac. You are correct that there are some fatal exceptions generated when headless is set to true, but these appear to be only from the scatterPlot3D and associationRulesVisualizer packages for me, and stem from 3rd party libraries used therein (we have no control over that). There is also a harmless exception (warning?) from dl4j that I've omitted from the output below:

Selenium:weka mhall$ java -Djava.awt.headless=true -cp weka.jar weka.Run .FindWithCapabilities -superclass weka.classifiers.Classifier -generic
Getting parent classloader....
Injecting JRI classes into the root class loader...
Trying systemwide default location for R under Mac OS...
Trying to loaded R library from /Library/Frameworks/R.framework/Resources/library/rJava/jri/libjri.jnilib
Engine class: class org.rosuda.JRI.Rengine ClassLoader:sun.misc.Launcher$ExtClassLoader@7cc355be
Successfully loaded R library from /Library/Frameworks/R.framework/Resources/library/rJava/jri/libjri.jnilib
Getting REngine....
Setting a default package mirror in R...

Searching for the following Capabilities:
- allowed:
- not allowed: -

Found 163 classes that matched the criteria:

weka.classifiers.bayes.BayesianLogisticRegression
weka.classifiers.bayes.BayesNet
weka.classifiers.bayes.ComplementNaiveBayes
weka.classifiers.bayes.DMNBtext
weka.classifiers.bayes.HMM
weka.classifiers.bayes.HNB
weka.classifiers.bayes.NaiveBayes
weka.classifiers.bayes.NaiveBayesMultinomial
weka.classifiers.bayes.NaiveBayesMultinomialText
weka.classifiers.bayes.NaiveBayesMultinomialUpdateable
weka.classifiers.bayes.NaiveBayesSimple
weka.classifiers.bayes.NaiveBayesUpdateable
weka.classifiers.bayes.SparseGenerativeModel
weka.classifiers.functions.Dl4jMlpClassifier
weka.classifiers.functions.ElasticNet
weka.classifiers.functions.FLDA
weka.classifiers.functions.GaussianProcesses
weka.classifiers.functions.IsotonicRegression
weka.classifiers.functions.KernelLogisticRegression
weka.classifiers.functions.LDA
weka.classifiers.functions.LeastMedSq
weka.classifiers.functions.LibLINEAR
weka.classifiers.functions.LibSVM
weka.classifiers.functions.LinearRegression
weka.classifiers.functions.Logistic
weka.classifiers.functions.MLPClassifier
weka.classifiers.functions.MLPRegressor
weka.classifiers.functions.MultilayerPerceptron
weka.classifiers.functions.MultilayerPerceptronCS
weka.classifiers.functions.NonNegativeLogisticRegression
weka.classifiers.functions.PaceRegression
weka.classifiers.functions.PLSClassifier
weka.classifiers.functions.QDA
weka.classifiers.functions.RBFClassifier
weka.classifiers.functions.RBFNetwork
weka.classifiers.functions.RBFRegressor
weka.classifiers.functions.SGD
weka.classifiers.functions.SGDText
weka.classifiers.functions.SimpleLinearRegression
weka.classifiers.functions.SimpleLogistic
weka.classifiers.functions.SMO
weka.classifiers.functions.SMOreg
weka.classifiers.functions.SPegasos
weka.classifiers.functions.VotedPerceptron
weka.classifiers.functions.Winnow
weka.classifiers.lazy.AnalogicalModeling
weka.classifiers.lazy.IB1
weka.classifiers.lazy.IBk
weka.classifiers.lazy.IBkLG
weka.classifiers.lazy.KStar
weka.classifiers.lazy.LBR
weka.classifiers.lazy.LocalKnn
weka.classifiers.lazy.LWL
weka.classifiers.lazy.RseslibKnn
weka.classifiers.meta.AdaBoostM1
weka.classifiers.meta.AdditiveRegression
weka.classifiers.meta.AggregateableFilteredClassifier
weka.classifiers.meta.AggregateableFilteredClassifierUpdateable
weka.classifiers.meta.AttributeSelectedClassifier
weka.classifiers.meta.Bagging
weka.classifiers.meta.BatchPredictorVote
weka.classifiers.meta.ClassificationViaClustering
weka.classifiers.meta.ClassificationViaRegression
weka.classifiers.meta.CostSensitiveClassifier
weka.classifiers.meta.Dagging
weka.classifiers.meta.END
weka.classifiers.meta.EnsembleSelection
weka.classifiers.meta.FilteredClassifier
weka.classifiers.meta.FilteredClassifierUpdateable
weka.classifiers.meta.GridSearch
weka.classifiers.meta.IterativeAbsoluteErrorRegression
weka.classifiers.meta.IterativeClassifierOptimizer
weka.classifiers.meta.LogitBoost
weka.classifiers.meta.MetaCost
weka.classifiers.meta.MOA
weka.classifiers.meta.MultiBoostAB
weka.classifiers.meta.MultiClassClassifier
weka.classifiers.meta.MultiClassClassifierUpdateable
weka.classifiers.meta.MultiScheme
weka.classifiers.meta.MultiSearch
weka.classifiers.meta.nestedDichotomies.ClassBalancedND
weka.classifiers.meta.nestedDichotomies.DataNearBalancedND
weka.classifiers.meta.nestedDichotomies.FurthestCentroidND
weka.classifiers.meta.nestedDichotomies.ND
weka.classifiers.meta.nestedDichotomies.RandomPairND
weka.classifiers.meta.OneClassClassifier
weka.classifiers.meta.OrdinalClassClassifier
weka.classifiers.meta.RacedIncrementalLogitBoost
weka.classifiers.meta.RandomCommittee
weka.classifiers.meta.RandomizableFilteredClassifier
weka.classifiers.meta.RandomSubSpace
weka.classifiers.meta.RealAdaBoost
weka.classifiers.meta.RotationForest
weka.classifiers.meta.ThresholdSelector
weka.classifiers.meta.Vote
weka.classifiers.meta.WeightedInstancesHandlerWrapper
weka.classifiers.mi.CitationKNN
weka.classifiers.mi.MDD
weka.classifiers.mi.MIBoost
weka.classifiers.mi.MIDD
weka.classifiers.mi.MIEMDD
weka.classifiers.mi.MILR
weka.classifiers.mi.MINND
weka.classifiers.mi.MIOptimalBall
weka.classifiers.mi.MIRI
weka.classifiers.mi.MISMO
weka.classifiers.mi.MISVM
weka.classifiers.mi.MITI
weka.classifiers.mi.MIWrapper
weka.classifiers.mi.QuickDDIterative
weka.classifiers.mi.SimpleMI
weka.classifiers.mi.TLC
weka.classifiers.mi.TLD
weka.classifiers.mi.TLDSimple
weka.classifiers.misc.CHIRP
weka.classifiers.misc.FLR
weka.classifiers.misc.HyperPipes
weka.classifiers.misc.InputMappedClassifier
weka.classifiers.misc.IsolationForest
weka.classifiers.misc.LOF
weka.classifiers.misc.OSDL
weka.classifiers.misc.SerializedClassifier
weka.classifiers.misc.VFI
weka.classifiers.rules.ConjunctiveRule
weka.classifiers.rules.DecisionTable
weka.classifiers.rules.DTNB
weka.classifiers.rules.LAC
weka.classifiers.rules.M5Rules
weka.classifiers.rules.MODLEM
weka.classifiers.rules.MultiObjectiveEvolutionaryFuzzyClassifier
weka.classifiers.rules.NNge
weka.classifiers.rules.OLM
weka.classifiers.rules.OneR
weka.classifiers.rules.PART
weka.classifiers.rules.Prism
weka.classifiers.rules.Ridor
weka.classifiers.rules.RoughSet
weka.classifiers.rules.Vfdr
weka.classifiers.rules.ZeroR
weka.classifiers.scripting.GroovyClassifier
weka.classifiers.scripting.JythonClassifier
weka.classifiers.trees.ADTree
weka.classifiers.trees.AlternatingModelTree
weka.classifiers.trees.BFTree
weka.classifiers.trees.CDT
weka.classifiers.trees.DecisionStump
weka.classifiers.trees.ExtraTree
weka.classifiers.trees.FT
weka.classifiers.trees.HoeffdingTree
weka.classifiers.trees.Id3
weka.classifiers.trees.IsolationForest
weka.classifiers.trees.J48
weka.classifiers.trees.J48Consolidated
weka.classifiers.trees.J48graft
weka.classifiers.trees.LADTree
weka.classifiers.trees.LMT
weka.classifiers.trees.M5P
weka.classifiers.trees.NBTree
weka.classifiers.trees.RandomForest
weka.classifiers.trees.RandomTree
weka.classifiers.trees.REPTree
weka.classifiers.trees.SimpleCart
weka.classifiers.trees.UserClassifier



On 1/08/17, 2:59 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:

   Hi, Mark.
   Unfortunately neither the developer nor stable-3-8 branch snapshots as of July 31 work either with the weka.Run interface nor seem to load all the packages with
   weka.core.FindWithCapabilities
   I verified that my generic properties creator props file has UseDynamic=true set.
   my command lines are:
   java -Djava.awt.headless=true weka.Run weka.core.FindWithCapabilities -binary-class -numeric-atts -generic -superclass weka.classifiers.Classifier
   and
   sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -binary-class -numeric-atts -generic -superclass weka.classifiers.Classifier
   
   I'm using
   Java 1.8.0-141-B16
   on Centos 7
   if that helps.
   
   I'm not sure what's going on.  When I set
   java.awt.headless=true
   I get more errors from javax.
   
   For some reason, I get far fewer complaints using the developer branch snapshot.  In stable a lot of packages complain that they don't support Weka 3.8.2
   but neither snapshot seems to work with weka.Run or finds packages.
   
   Is there any further testing that I can do on my end?
   Thanks so much for working with this.
   
   Brad
   
   
   
   "Bradley E Harris" ---07/28/2017 10:33:10 AM---Hi, Mark. Thanks for the bug fix.  I'll test it on both stable and development
   
   From:        "Bradley E Harris" <[hidden email]>
   To:        "Weka machine learning workbench list." <[hidden email]>
   Date:        07/28/2017 10:33 AM
   Subject:        Re: [Wekalist] getting list of available classes including packages from command line
   Sent by:        [hidden email]
   
   ________________________________________
   
   
   
   Hi, Mark.
   
   Thanks for the bug fix. I'll test it on both stable and development branches and let you know. I definitely appreciate the fix. This one has bothered me ever since I couldn't figure out why my Java program didn't work. :)
   
   Also, thank you for implementing the CLI interface. This helps a lot. xvfb-run isn't difficult, but this makes things less resource intensive. :)
   
   Thanks,
   Brad
   
   
   Mark Hall ---07/27/2017 07:17:17 PM---Damn! I obviously didn't look too closely at the output generated by FindWithCapabilities :-) I've c
   
   From: Mark Hall <[hidden email]>
   To: "Weka machine learning workbench list." <[hidden email]>
   Date: 07/27/2017 07:17 PM
   Subject: Re: [Wekalist] getting list of available classes including packages from command line
   Sent by: [hidden email]
   ________________________________________
   
   
   
   Damn! I obviously didn't look too closely at the output generated by FindWithCapabilities :-) I've committed another fix to both trunk (3.9) and stable-3-8. FindWindCapabilities now uses WekaPackageClassloaderManager to instantiate potential matches instead of Class.forName() (which fails for package-based schemes). It also now implements CommandlineRunnable, so can be executed with weka.Run. The fix will be in the next nightly snapshot. Sorry for the confusion.
   
   Cheers,
   Mark.
   
   On 28/07/17, 5:51 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:
   
      Hi, Mark.
     
      I think I must be doing something wrong. I've downloaded 3.9.1, 3.8.1, stable-branch-3.8 and developer-branch
      and none of them seems to load the additional packages, even though the props file is set to UseDynamic=true
      Did I download the wrong branch or file?  I just finished testing both nightly snapshots.  I'm not sure what's going wrong.  Is it possible that the last snapshot was taken before you introduced the fix?  Did I download the wrong zip files?
      Do the packages lack the descriptor field that says, for example, that the package is a binary classifier?
      Perhaps it's loading packages and just not being able to match?
     
      On an odd note, weka.core.FindWithCapabilities doesn't work when preceeded by weka.Run
     
      Here is my command line:
      sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -binary-class -generic -superclass weka.classifiers.Classifier
      with $CLASSPATH set to
      /home/myuser/wekafiles/packages/snowball-stemmers/snowball-stemmers.jar:/home/myuser/bin/weka-stable-branch/weka/weka.jar
     
      Am I doing something wrong?
     
      Thanks,
      Brad
     
     
      Mark Hall ---07/26/2017 06:33:28 PM---The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trun
     
      From:        Mark Hall <[hidden email]>
      To:        "Weka machine learning workbench list." <[hidden email]>
      Date:        07/26/2017 06:33 PM
      Subject:        Re: [Wekalist] getting list of available classes including packages from command line
      Sent by:        [hidden email]
     
      ________________________________________
     
     
     
      The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trunk and stable-3-8 to rectify this. You can get the fix in the next nightly snapshot or from subversion. Thanks for the bug report.
     
      Cheers,
      Mark.
     
      On 27/07/17, 3:53 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:
     
          Hello, everyone.
          As a small adendum to my last post, I was able to get weka.core.FindWithCapabilities to print to the screen
          sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -superclass "weka.classifiers.Classifier" -generic
         
          lists all available classes.  I can also add things like
          -binary-class
          and filter that way.
          However, the problem from my last post remains.  Even though
          UseDynamic=true
          is set in the props file, the package-based classifiers still aren't being listed.
         
          Thanks,
          Brad Harris
         
         
          "Bradley E Harris" ---07/26/2017 10:44:16 AM---Hi, everyone. I am trying to get a list of all the available classes in weka including
         
          From:        "Bradley E Harris" <[hidden email]>
          To:        [hidden email]
          Date:        07/26/2017 10:44 AM
          Subject:        [Wekalist] getting list of available classes including packages        from command line
          Sent by:        [hidden email]
         
          ________________________________________
         
         
         
          Hi, everyone.
         
          I am trying to get a list of all the available classes in weka including the packages that I have added from the command line.
          I at first thought I could use weka.core.FindWithCapabilities, but there's no way to print out the results or write them to a file. I can get around the requirement for X11, but it has to have the ability to write to a file. So,
          I wrote a small java program that calls weka.gui.GenericPropertiesCreator, which is the suggestion I found on I believe an earlier post on this list. This is also the technique used by FindWithCapabilities.
          I am running on a headless display, and the code requires X11. So, to get around that I wrote the code to output to a file and used xvfb to run it. I used the GenericPropertiesCreator.props file from the weka src directory after verifying that it contained the
          UseDynamic=true
          statement, which is supposed to list items from all the loaded packages, or that's what I've read anyway.
          However, the generated file includes some packages but not others. For example, weka.classifiers.misc.IsolationForest doesn't show up in the resulting properties file. It also appears that NaiveBayesTree (or NBTree) is missing as well. However, things like AddativeRegression and MOA are there. My class path is set to point to weka.jar. Is weka not loading all available packages for some reason? I can, for example, access IsolationForest from the command line:
          java weka.Run weka.classifiers.misc.IsolationForest
          but it isn't in the generated properties file.
          Below is my java code. I have no clue how to write java, so I used a mixture of sample code, FindWithCapabilities.java and the documentation for weka.gui.GenericPropertiesCreator
          I'm sure I'm importing classes I don't need, but it doesn't seem to hurt it.
          It compiles with javac
          and, with my CLASSPATH variable set to point to weka.jar only it generates classifiers.properties with:
          sudo xvfb-run java list_classifiers
         
          ----------
          [myuser@localhost ~]$ more list_classifiers.java
          import weka.core.Capabilities.Capability;
          import weka.gui.GenericPropertiesCreator;
         
          import java.io.BufferedReader;
          import java.io.FileReader;
          import java.util.Enumeration;
          import java.util.Iterator;
          import java.util.Properties;
          import java.util.StringTokenizer;
          import java.util.Vector;
          public class list_classifiers {
          public static void main(String[] args) throws Exception {
          try {
          GenericPropertiesCreator creator;
         
          creator = new GenericPropertiesCreator("/home/myuser/GenericPropertiesCreator.props");
          creator.setExplicitPropsFile(true);
          creator.setOutputFilename("classifiers.properties");
          creator.execute(true, true);
          } catch(Exception e){
          }
         
          }
          }
         
          Does anyone know how to write out the rest of the available classifiers?
         
          Thanks,
          Brad Harris
         
         
          _______________________________________________
          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
     
     
     
     
     
      _______________________________________________
      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
   
   
   
   
   _______________________________________________
   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

_______________________________________________
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

graycol.gif (142 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: getting list of available classes including packages from command line

Mark Hall
In reply to this post by Bradley E Harris
We recommend the use of an Oracle JVM. There have been various issues with Open JDK in the past.

Cheers,
Mark.

On 2/08/17, 5:48 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:

    Hi, Mark.
    I unfortunately get totally different results from yours, and I'm not sure why.  As you can see, X11 is still saying that it needs to start, and I'm not getting far enough to launch the class loader.
    I'm using the July 31st snapshot of developer-branch
    with openjdk 1.8.0-141
    As you can see, it still looks like it's trying to start the GUI.
    Am I doing something wrong?
    Thanks,
    Brad
   
    Here is what I get with your command:
    [myuser@localhost weka_output_files]$ java -Djava.awt.headless=true weka.Run .FindWithCapabilities -superclass weka.classifiers.Classifier -generic  2>&1
    [Weka] RPlugin can't be loaded because the environment variable R_HOME is not set.
    [Weka] RPlugin can't be loaded because the environment variable R_HOME is not set
    [Weka] Integrity: removing classloader for: RPlugin
    3D [dev] 1.6.0-pre12-daily-experimental daily
   
    Exception in thread "main" java.lang.ExceptionInInitializerError
            javax.media.j3d.NodeRetained.dirtyBoundsCache(NodeRetained.java:974)
            javax.media.j3d.Shape3DRetained.setGeometry(Shape3DRetained.java:368)
            javax.media.j3d.Shape3D.setGeometry(Shape3D.java:253)
            com.sun.j3d.utils.geometry.Text2D.updateText2D(Text2D.java:223)
            com.sun.j3d.utils.geometry.Text2D.<init>(Text2D.java:126)
            weka.gui.visualize.VisualizePanel3D.<clinit>(VisualizePanel3D.java:569)
            java.lang.Class.forName0(Native Method)
            java.lang.Class.forName(Class.java:348)
            weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:198)
            weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:178)
            weka.core.ClassDiscovery.find(ClassDiscovery.java:247)
            weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
            weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
            weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:615)
            weka.core.converters.ConverterResources.initialize(ConverterResources.java:168)
            weka.core.converters.ConverterUtils.initialize(ConverterUtils.java:688)
            weka.core.converters.ConverterUtils.<clinit>(ConverterUtils.java:684)
            java.lang.Class.forName0(Native Method)
            java.lang.Class.forName(Class.java:348)
            weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:198)
            weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:178)
            weka.core.ClassDiscovery.find(ClassDiscovery.java:247)
            weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
            weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
            weka.gui.GenericPropertiesCreator.<clinit>(GenericPropertiesCreator.java:167)
            weka.gui.GenericObjectEditor.determineClasses(GenericObjectEditor.java:200)
            weka.gui.GenericObjectEditor.<clinit>(GenericObjectEditor.java:263)
            weka.core.FindWithCapabilities.run(FindWithCapabilities.java:1058)
            weka.Run.main(Run.java:349)
   
            at javax.media.j3d.NodeRetained.dirtyBoundsCache(NodeRetained.java:974)
            at javax.media.j3d.Shape3DRetained.setGeometry(Shape3DRetained.java:368)
            at javax.media.j3d.Shape3D.setGeometry(Shape3D.java:253)
            at com.sun.j3d.utils.geometry.Text2D.updateText2D(Text2D.java:223)
            at com.sun.j3d.utils.geometry.Text2D.<init>(Text2D.java:126)
            at weka.gui.visualize.VisualizePanel3D.<clinit>(VisualizePanel3D.java:569)
            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.ClassDiscovery.find(ClassDiscovery.java:247)
            at weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
            at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
            at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:615)
            at weka.core.converters.ConverterResources.initialize(ConverterResources.java:168)
            at weka.core.converters.ConverterUtils.initialize(ConverterUtils.java:688)
            at weka.core.converters.ConverterUtils.<clinit>(ConverterUtils.java:684)
            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.ClassDiscovery.find(ClassDiscovery.java:247)
            at weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
            at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
            at weka.gui.GenericPropertiesCreator.<clinit>(GenericPropertiesCreator.java:167)
            at weka.gui.GenericObjectEditor.determineClasses(GenericObjectEditor.java:200)
            at weka.gui.GenericObjectEditor.<clinit>(GenericObjectEditor.java:263)
            at weka.core.FindWithCapabilities.run(FindWithCapabilities.java:1058)
            at weka.Run.main(Run.java:349)
    Caused by: java.awt.HeadlessException
            at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:269)
            ... 29 more
    [myuser@localhost weka_output_files]$
   
    Mark Hall ---07/31/2017 05:55:47 PM---I've just checked the developer nightly snapshot and it is working for me on my Mac. You are correct
   
    From:        Mark Hall <[hidden email]>
    To:        "Weka machine learning workbench list." <[hidden email]>
    Date:        07/31/2017 05:55 PM
    Subject:        Re: [Wekalist] getting list of available classes including packages from command line
    Sent by:        [hidden email]
   
    ________________________________________
   
   
   
    I've just checked the developer nightly snapshot and it is working for me on my Mac. You are correct that there are some fatal exceptions generated when headless is set to true, but these appear to be only from the scatterPlot3D and associationRulesVisualizer packages for me, and stem from 3rd party libraries used therein (we have no control over that). There is also a harmless exception (warning?) from dl4j that I've omitted from the output below:
   
    Selenium:weka mhall$ java -Djava.awt.headless=true -cp weka.jar weka.Run .FindWithCapabilities -superclass weka.classifiers.Classifier -generic
    Getting parent classloader....
    Injecting JRI classes into the root class loader...
    Trying systemwide default location for R under Mac OS...
    Trying to loaded R library from /Library/Frameworks/R.framework/Resources/library/rJava/jri/libjri.jnilib
    Engine class: class org.rosuda.JRI.Rengine ClassLoader:sun.misc.Launcher$ExtClassLoader@7cc355be
    Successfully loaded R library from /Library/Frameworks/R.framework/Resources/library/rJava/jri/libjri.jnilib
    Getting REngine....
    Setting a default package mirror in R...
   
    Searching for the following Capabilities:
    - allowed:
    - not allowed: -
   
    Found 163 classes that matched the criteria:
   
    weka.classifiers.bayes.BayesianLogisticRegression
    weka.classifiers.bayes.BayesNet
    weka.classifiers.bayes.ComplementNaiveBayes
    weka.classifiers.bayes.DMNBtext
    weka.classifiers.bayes.HMM
    weka.classifiers.bayes.HNB
    weka.classifiers.bayes.NaiveBayes
    weka.classifiers.bayes.NaiveBayesMultinomial
    weka.classifiers.bayes.NaiveBayesMultinomialText
    weka.classifiers.bayes.NaiveBayesMultinomialUpdateable
    weka.classifiers.bayes.NaiveBayesSimple
    weka.classifiers.bayes.NaiveBayesUpdateable
    weka.classifiers.bayes.SparseGenerativeModel
    weka.classifiers.functions.Dl4jMlpClassifier
    weka.classifiers.functions.ElasticNet
    weka.classifiers.functions.FLDA
    weka.classifiers.functions.GaussianProcesses
    weka.classifiers.functions.IsotonicRegression
    weka.classifiers.functions.KernelLogisticRegression
    weka.classifiers.functions.LDA
    weka.classifiers.functions.LeastMedSq
    weka.classifiers.functions.LibLINEAR
    weka.classifiers.functions.LibSVM
    weka.classifiers.functions.LinearRegression
    weka.classifiers.functions.Logistic
    weka.classifiers.functions.MLPClassifier
    weka.classifiers.functions.MLPRegressor
    weka.classifiers.functions.MultilayerPerceptron
    weka.classifiers.functions.MultilayerPerceptronCS
    weka.classifiers.functions.NonNegativeLogisticRegression
    weka.classifiers.functions.PaceRegression
    weka.classifiers.functions.PLSClassifier
    weka.classifiers.functions.QDA
    weka.classifiers.functions.RBFClassifier
    weka.classifiers.functions.RBFNetwork
    weka.classifiers.functions.RBFRegressor
    weka.classifiers.functions.SGD
    weka.classifiers.functions.SGDText
    weka.classifiers.functions.SimpleLinearRegression
    weka.classifiers.functions.SimpleLogistic
    weka.classifiers.functions.SMO
    weka.classifiers.functions.SMOreg
    weka.classifiers.functions.SPegasos
    weka.classifiers.functions.VotedPerceptron
    weka.classifiers.functions.Winnow
    weka.classifiers.lazy.AnalogicalModeling
    weka.classifiers.lazy.IB1
    weka.classifiers.lazy.IBk
    weka.classifiers.lazy.IBkLG
    weka.classifiers.lazy.KStar
    weka.classifiers.lazy.LBR
    weka.classifiers.lazy.LocalKnn
    weka.classifiers.lazy.LWL
    weka.classifiers.lazy.RseslibKnn
    weka.classifiers.meta.AdaBoostM1
    weka.classifiers.meta.AdditiveRegression
    weka.classifiers.meta.AggregateableFilteredClassifier
    weka.classifiers.meta.AggregateableFilteredClassifierUpdateable
    weka.classifiers.meta.AttributeSelectedClassifier
    weka.classifiers.meta.Bagging
    weka.classifiers.meta.BatchPredictorVote
    weka.classifiers.meta.ClassificationViaClustering
    weka.classifiers.meta.ClassificationViaRegression
    weka.classifiers.meta.CostSensitiveClassifier
    weka.classifiers.meta.Dagging
    weka.classifiers.meta.END
    weka.classifiers.meta.EnsembleSelection
    weka.classifiers.meta.FilteredClassifier
    weka.classifiers.meta.FilteredClassifierUpdateable
    weka.classifiers.meta.GridSearch
    weka.classifiers.meta.IterativeAbsoluteErrorRegression
    weka.classifiers.meta.IterativeClassifierOptimizer
    weka.classifiers.meta.LogitBoost
    weka.classifiers.meta.MetaCost
    weka.classifiers.meta.MOA
    weka.classifiers.meta.MultiBoostAB
    weka.classifiers.meta.MultiClassClassifier
    weka.classifiers.meta.MultiClassClassifierUpdateable
    weka.classifiers.meta.MultiScheme
    weka.classifiers.meta.MultiSearch
    weka.classifiers.meta.nestedDichotomies.ClassBalancedND
    weka.classifiers.meta.nestedDichotomies.DataNearBalancedND
    weka.classifiers.meta.nestedDichotomies.FurthestCentroidND
    weka.classifiers.meta.nestedDichotomies.ND
    weka.classifiers.meta.nestedDichotomies.RandomPairND
    weka.classifiers.meta.OneClassClassifier
    weka.classifiers.meta.OrdinalClassClassifier
    weka.classifiers.meta.RacedIncrementalLogitBoost
    weka.classifiers.meta.RandomCommittee
    weka.classifiers.meta.RandomizableFilteredClassifier
    weka.classifiers.meta.RandomSubSpace
    weka.classifiers.meta.RealAdaBoost
    weka.classifiers.meta.RotationForest
    weka.classifiers.meta.ThresholdSelector
    weka.classifiers.meta.Vote
    weka.classifiers.meta.WeightedInstancesHandlerWrapper
    weka.classifiers.mi.CitationKNN
    weka.classifiers.mi.MDD
    weka.classifiers.mi.MIBoost
    weka.classifiers.mi.MIDD
    weka.classifiers.mi.MIEMDD
    weka.classifiers.mi.MILR
    weka.classifiers.mi.MINND
    weka.classifiers.mi.MIOptimalBall
    weka.classifiers.mi.MIRI
    weka.classifiers.mi.MISMO
    weka.classifiers.mi.MISVM
    weka.classifiers.mi.MITI
    weka.classifiers.mi.MIWrapper
    weka.classifiers.mi.QuickDDIterative
    weka.classifiers.mi.SimpleMI
    weka.classifiers.mi.TLC
    weka.classifiers.mi.TLD
    weka.classifiers.mi.TLDSimple
    weka.classifiers.misc.CHIRP
    weka.classifiers.misc.FLR
    weka.classifiers.misc.HyperPipes
    weka.classifiers.misc.InputMappedClassifier
    weka.classifiers.misc.IsolationForest
    weka.classifiers.misc.LOF
    weka.classifiers.misc.OSDL
    weka.classifiers.misc.SerializedClassifier
    weka.classifiers.misc.VFI
    weka.classifiers.rules.ConjunctiveRule
    weka.classifiers.rules.DecisionTable
    weka.classifiers.rules.DTNB
    weka.classifiers.rules.LAC
    weka.classifiers.rules.M5Rules
    weka.classifiers.rules.MODLEM
    weka.classifiers.rules.MultiObjectiveEvolutionaryFuzzyClassifier
    weka.classifiers.rules.NNge
    weka.classifiers.rules.OLM
    weka.classifiers.rules.OneR
    weka.classifiers.rules.PART
    weka.classifiers.rules.Prism
    weka.classifiers.rules.Ridor
    weka.classifiers.rules.RoughSet
    weka.classifiers.rules.Vfdr
    weka.classifiers.rules.ZeroR
    weka.classifiers.scripting.GroovyClassifier
    weka.classifiers.scripting.JythonClassifier
    weka.classifiers.trees.ADTree
    weka.classifiers.trees.AlternatingModelTree
    weka.classifiers.trees.BFTree
    weka.classifiers.trees.CDT
    weka.classifiers.trees.DecisionStump
    weka.classifiers.trees.ExtraTree
    weka.classifiers.trees.FT
    weka.classifiers.trees.HoeffdingTree
    weka.classifiers.trees.Id3
    weka.classifiers.trees.IsolationForest
    weka.classifiers.trees.J48
    weka.classifiers.trees.J48Consolidated
    weka.classifiers.trees.J48graft
    weka.classifiers.trees.LADTree
    weka.classifiers.trees.LMT
    weka.classifiers.trees.M5P
    weka.classifiers.trees.NBTree
    weka.classifiers.trees.RandomForest
    weka.classifiers.trees.RandomTree
    weka.classifiers.trees.REPTree
    weka.classifiers.trees.SimpleCart
    weka.classifiers.trees.UserClassifier
   
   
   
    On 1/08/17, 2:59 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:
   
        Hi, Mark.
        Unfortunately neither the developer nor stable-3-8 branch snapshots as of July 31 work either with the weka.Run interface nor seem to load all the packages with
        weka.core.FindWithCapabilities
        I verified that my generic properties creator props file has UseDynamic=true set.
        my command lines are:
        java -Djava.awt.headless=true weka.Run weka.core.FindWithCapabilities -binary-class -numeric-atts -generic -superclass weka.classifiers.Classifier
        and
        sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -binary-class -numeric-atts -generic -superclass weka.classifiers.Classifier
       
        I'm using
        Java 1.8.0-141-B16
        on Centos 7
        if that helps.
       
        I'm not sure what's going on.  When I set
        java.awt.headless=true
        I get more errors from javax.
       
        For some reason, I get far fewer complaints using the developer branch snapshot.  In stable a lot of packages complain that they don't support Weka 3.8.2
        but neither snapshot seems to work with weka.Run or finds packages.
       
        Is there any further testing that I can do on my end?
        Thanks so much for working with this.
       
        Brad
       
       
       
        "Bradley E Harris" ---07/28/2017 10:33:10 AM---Hi, Mark. Thanks for the bug fix.  I'll test it on both stable and development
       
        From:        "Bradley E Harris" <[hidden email]>
        To:        "Weka machine learning workbench list." <[hidden email]>
        Date:        07/28/2017 10:33 AM
        Subject:        Re: [Wekalist] getting list of available classes including packages from command line
        Sent by:        [hidden email]
       
        ________________________________________
       
       
       
        Hi, Mark.
       
        Thanks for the bug fix. I'll test it on both stable and development branches and let you know. I definitely appreciate the fix. This one has bothered me ever since I couldn't figure out why my Java program didn't work. :)
       
        Also, thank you for implementing the CLI interface. This helps a lot. xvfb-run isn't difficult, but this makes things less resource intensive. :)
       
        Thanks,
        Brad
       
       
        Mark Hall ---07/27/2017 07:17:17 PM---Damn! I obviously didn't look too closely at the output generated by FindWithCapabilities :-) I've c
       
        From: Mark Hall <[hidden email]>
        To: "Weka machine learning workbench list." <[hidden email]>
        Date: 07/27/2017 07:17 PM
        Subject: Re: [Wekalist] getting list of available classes including packages from command line
        Sent by: [hidden email]
        ________________________________________
       
       
       
        Damn! I obviously didn't look too closely at the output generated by FindWithCapabilities :-) I've committed another fix to both trunk (3.9) and stable-3-8. FindWindCapabilities now uses WekaPackageClassloaderManager to instantiate potential matches instead of Class.forName() (which fails for package-based schemes). It also now implements CommandlineRunnable, so can be executed with weka.Run. The fix will be in the next nightly snapshot. Sorry for the confusion.
       
        Cheers,
        Mark.
       
        On 28/07/17, 5:51 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:
       
           Hi, Mark.
           
           I think I must be doing something wrong. I've downloaded 3.9.1, 3.8.1, stable-branch-3.8 and developer-branch
           and none of them seems to load the additional packages, even though the props file is set to UseDynamic=true
           Did I download the wrong branch or file?  I just finished testing both nightly snapshots.  I'm not sure what's going wrong.  Is it possible that the last snapshot was taken before you introduced the fix?  Did I download the wrong zip files?
           Do the packages lack the descriptor field that says, for example, that the package is a binary classifier?
           Perhaps it's loading packages and just not being able to match?
           
           On an odd note, weka.core.FindWithCapabilities doesn't work when preceeded by weka.Run
           
           Here is my command line:
           sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -binary-class -generic -superclass weka.classifiers.Classifier
           with $CLASSPATH set to
           /home/myuser/wekafiles/packages/snowball-stemmers/snowball-stemmers.jar:/home/myuser/bin/weka-stable-branch/weka/weka.jar
           
           Am I doing something wrong?
           
           Thanks,
           Brad
           
           
           Mark Hall ---07/26/2017 06:33:28 PM---The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trun
           
           From:        Mark Hall <[hidden email]>
           To:        "Weka machine learning workbench list." <[hidden email]>
           Date:        07/26/2017 06:33 PM
           Subject:        Re: [Wekalist] getting list of available classes including packages from command line
           Sent by:        [hidden email]
           
           ________________________________________
           
           
           
           The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trunk and stable-3-8 to rectify this. You can get the fix in the next nightly snapshot or from subversion. Thanks for the bug report.
           
           Cheers,
           Mark.
           
           On 27/07/17, 3:53 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:
           
               Hello, everyone.
               As a small adendum to my last post, I was able to get weka.core.FindWithCapabilities to print to the screen
               sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -superclass "weka.classifiers.Classifier" -generic
               
               lists all available classes.  I can also add things like
               -binary-class
               and filter that way.
               However, the problem from my last post remains.  Even though
               UseDynamic=true
               is set in the props file, the package-based classifiers still aren't being listed.
               
               Thanks,
               Brad Harris
               
               
               "Bradley E Harris" ---07/26/2017 10:44:16 AM---Hi, everyone. I am trying to get a list of all the available classes in weka including
               
               From:        "Bradley E Harris" <[hidden email]>
               To:        [hidden email]
               Date:        07/26/2017 10:44 AM
               Subject:        [Wekalist] getting list of available classes including packages        from command line
               Sent by:        [hidden email]
               
               ________________________________________
               
               
               
               Hi, everyone.
               
               I am trying to get a list of all the available classes in weka including the packages that I have added from the command line.
               I at first thought I could use weka.core.FindWithCapabilities, but there's no way to print out the results or write them to a file. I can get around the requirement for X11, but it has to have the ability to write to a file. So,
               I wrote a small java program that calls weka.gui.GenericPropertiesCreator, which is the suggestion I found on I believe an earlier post on this list. This is also the technique used by FindWithCapabilities.
               I am running on a headless display, and the code requires X11. So, to get around that I wrote the code to output to a file and used xvfb to run it. I used the GenericPropertiesCreator.props file from the weka src directory after verifying that it contained the
               UseDynamic=true
               statement, which is supposed to list items from all the loaded packages, or that's what I've read anyway.
               However, the generated file includes some packages but not others. For example, weka.classifiers.misc.IsolationForest doesn't show up in the resulting properties file. It also appears that NaiveBayesTree (or NBTree) is missing as well. However, things like AddativeRegression and MOA are there. My class path is set to point to weka.jar. Is weka not loading all available packages for some reason? I can, for example, access IsolationForest from the command line:
               java weka.Run weka.classifiers.misc.IsolationForest
               but it isn't in the generated properties file.
               Below is my java code. I have no clue how to write java, so I used a mixture of sample code, FindWithCapabilities.java and the documentation for weka.gui.GenericPropertiesCreator
               I'm sure I'm importing classes I don't need, but it doesn't seem to hurt it.
               It compiles with javac
               and, with my CLASSPATH variable set to point to weka.jar only it generates classifiers.properties with:
               sudo xvfb-run java list_classifiers
               
               ----------
               [myuser@localhost ~]$ more list_classifiers.java
               import weka.core.Capabilities.Capability;
               import weka.gui.GenericPropertiesCreator;
               
               import java.io.BufferedReader;
               import java.io.FileReader;
               import java.util.Enumeration;
               import java.util.Iterator;
               import java.util.Properties;
               import java.util.StringTokenizer;
               import java.util.Vector;
               public class list_classifiers {
               public static void main(String[] args) throws Exception {
               try {
               GenericPropertiesCreator creator;
               
               creator = new GenericPropertiesCreator("/home/myuser/GenericPropertiesCreator.props");
               creator.setExplicitPropsFile(true);
               creator.setOutputFilename("classifiers.properties");
               creator.execute(true, true);
               } catch(Exception e){
               }
               
               }
               }
               
               Does anyone know how to write out the rest of the available classifiers?
               
               Thanks,
               Brad Harris
               
               
               _______________________________________________
               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
           
           
           
           
           
           _______________________________________________
           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
       
       
       
       
        _______________________________________________
        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
   


_______________________________________________
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: getting list of available classes including packages from command line

Bradley E Harris
In reply to this post by Eibe Frank-3

Hi, Eibe.
That was it! Thank you. :)

Brad


Inactive hide details for Eibe Frank ---08/01/2017 04:54:43 PM---It looks like the issue is due to the 3D scatter plot package.Eibe Frank ---08/01/2017 04:54:43 PM---It looks like the issue is due to the 3D scatter plot package. Just uninstall that package (or disab

From: Eibe Frank <[hidden email]>
To: "Weka machine learning workbench list." <[hidden email]>
Date: 08/01/2017 04:54 PM
Subject: Re: [Wekalist] getting list of available classes including packages from command line
Sent by: [hidden email]





It looks like the issue is due to the 3D scatter plot package. Just uninstall that package (or disable loading).

Cheers,
Eibe

On Wed, 2 Aug 2017 at 5:48 AM, Bradley E Harris <[hidden email]> wrote:
    Hi, Mark.
    I unfortunately get totally different results from yours, and I'm not sure why. As you can see, X11 is still saying that it needs to start, and I'm not getting far enough to launch the class loader.
    I'm using the July 31st snapshot of developer-branch
    with openjdk 1.8.0-141
    As you can see, it still looks like it's trying to start the GUI.


    Am I doing something wrong?
    Thanks,
    Brad

    Here is what I get with your command:
    [myuser@localhost weka_output_files]$ java -Djava.awt.headless=true weka.Run .FindWithCapabilities -superclass weka.classifiers.Classifier -generic 2>&1
    [Weka] RPlugin can't be loaded because the environment variable R_HOME is not set.
    [Weka] RPlugin can't be loaded because the environment variable R_HOME is not set
    [Weka] Integrity: removing classloader for: RPlugin
    3D [dev] 1.6.0-pre12-daily-experimental daily


    Exception in thread "main" java.lang.ExceptionInInitializerError
    javax.media.j3d.NodeRetained.dirtyBoundsCache(NodeRetained.java:974)
    javax.media.j3d.Shape3DRetained.setGeometry(Shape3DRetained.java:368)
    javax.media.j3d.Shape3D.setGeometry(Shape3D.java:253)
    com.sun.j3d.utils.geometry.Text2D.updateText2D(Text2D.java:223)
    com.sun.j3d.utils.geometry.Text2D.<init>(Text2D.java:126)
    weka.gui.visualize.VisualizePanel3D.<clinit>(VisualizePanel3D.java:569)
    java.lang.Class.forName0(Native Method)
    java.lang.Class.forName(Class.java:348)
    weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:198)
    weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:178)
    weka.core.ClassDiscovery.find(ClassDiscovery.java:247)
    weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
    weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
    weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:615)
    weka.core.converters.ConverterResources.initialize(ConverterResources.java:168)
    weka.core.converters.ConverterUtils.initialize(ConverterUtils.java:688)
    weka.core.converters.ConverterUtils.<clinit>(ConverterUtils.java:684)
    java.lang.Class.forName0(Native Method)
    java.lang.Class.forName(Class.java:348)
    weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:198)
    weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:178)
    weka.core.ClassDiscovery.find(ClassDiscovery.java:247)
    weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
    weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
    weka.gui.GenericPropertiesCreator.<clinit>(GenericPropertiesCreator.java:167)
    weka.gui.GenericObjectEditor.determineClasses(GenericObjectEditor.java:200)
    weka.gui.GenericObjectEditor.<clinit>(GenericObjectEditor.java:263)
    weka.core.FindWithCapabilities.run(FindWithCapabilities.java:1058)
    weka.Run.main(Run.java:349)


    at javax.media.j3d.NodeRetained.dirtyBoundsCache(NodeRetained.java:974)
    at javax.media.j3d.Shape3DRetained.setGeometry(Shape3DRetained.java:368)
    at javax.media.j3d.Shape3D.setGeometry(Shape3D.java:253)
    at com.sun.j3d.utils.geometry.Text2D.updateText2D(Text2D.java:223)
    at com.sun.j3d.utils.geometry.Text2D.<init>(Text2D.java:126)
    at weka.gui.visualize.VisualizePanel3D.<clinit>(VisualizePanel3D.java:569)
    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.ClassDiscovery.find(ClassDiscovery.java:247)
    at weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
    at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
    at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:615)
    at weka.core.converters.ConverterResources.initialize(ConverterResources.java:168)
    at weka.core.converters.ConverterUtils.initialize(ConverterUtils.java:688)
    at weka.core.converters.ConverterUtils.<clinit>(ConverterUtils.java:684)
    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.ClassDiscovery.find(ClassDiscovery.java:247)
    at weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
    at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
    at weka.gui.GenericPropertiesCreator.<clinit>(GenericPropertiesCreator.java:167)
    at weka.gui.GenericObjectEditor.determineClasses(GenericObjectEditor.java:200)
    at weka.gui.GenericObjectEditor.<clinit>(GenericObjectEditor.java:263)
    at weka.core.FindWithCapabilities.run(FindWithCapabilities.java:1058)
    at weka.Run.main(Run.java:349)
    Caused by: java.awt.HeadlessException
    at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:269)
    ... 29 more
    [myuser@localhost weka_output_files]$


    Mark Hall ---07/31/2017 05:55:47 PM---I've just checked the developer nightly snapshot and it is working for me on my Mac. You are correct



    From:
    Mark Hall <[hidden email]>
    To:
    "Weka machine learning workbench list." <[hidden email]>

    Date: 07/31/2017 05:55 PM
    Subject:
    Re: [Wekalist] getting list of available classes including packages from command line


    Sent by:
    [hidden email]





    I've just checked the developer nightly snapshot and it is working for me on my Mac. You are correct that there are some fatal exceptions generated when headless is set to true, but these appear to be only from the scatterPlot3D and associationRulesVisualizer packages for me, and stem from 3rd party libraries used therein (we have no control over that). There is also a harmless exception (warning?) from dl4j that I've omitted from the output below:

    Selenium:weka mhall$ java -Djava.awt.headless=true -cp weka.jar weka.Run .FindWithCapabilities -superclass weka.classifiers.Classifier -generic
    Getting parent classloader....
    Injecting JRI classes into the root class loader...
    Trying systemwide default location for R under Mac OS...
    Trying to loaded R library from /Library/Frameworks/R.framework/Resources/library/rJava/jri/libjri.jnilib
    Engine class: class org.rosuda.JRI.Rengine ClassLoader:sun.misc.Launcher$ExtClassLoader@7cc355be
    Successfully loaded R library from /Library/Frameworks/R.framework/Resources/library/rJava/jri/libjri.jnilib
    Getting REngine....
    Setting a default package mirror in R...

    Searching for the following Capabilities:
    - allowed:
    - not allowed: -

    Found 163 classes that matched the criteria:

    weka.classifiers.bayes.BayesianLogisticRegression
    weka.classifiers.bayes.BayesNet
    weka.classifiers.bayes.ComplementNaiveBayes
    weka.classifiers.bayes.DMNBtext
    weka.classifiers.bayes.HMM
    weka.classifiers.bayes.HNB
    weka.classifiers.bayes.NaiveBayes
    weka.classifiers.bayes.NaiveBayesMultinomial
    weka.classifiers.bayes.NaiveBayesMultinomialText
    weka.classifiers.bayes.NaiveBayesMultinomialUpdateable
    weka.classifiers.bayes.NaiveBayesSimple
    weka.classifiers.bayes.NaiveBayesUpdateable
    weka.classifiers.bayes.SparseGenerativeModel
    weka.classifiers.functions.Dl4jMlpClassifier
    weka.classifiers.functions.ElasticNet
    weka.classifiers.functions.FLDA
    weka.classifiers.functions.GaussianProcesses
    weka.classifiers.functions.IsotonicRegression
    weka.classifiers.functions.KernelLogisticRegression
    weka.classifiers.functions.LDA
    weka.classifiers.functions.LeastMedSq
    weka.classifiers.functions.LibLINEAR
    weka.classifiers.functions.LibSVM
    weka.classifiers.functions.LinearRegression
    weka.classifiers.functions.Logistic
    weka.classifiers.functions.MLPClassifier
    weka.classifiers.functions.MLPRegressor
    weka.classifiers.functions.MultilayerPerceptron
    weka.classifiers.functions.MultilayerPerceptronCS
    weka.classifiers.functions.NonNegativeLogisticRegression
    weka.classifiers.functions.PaceRegression
    weka.classifiers.functions.PLSClassifier
    weka.classifiers.functions.QDA
    weka.classifiers.functions.RBFClassifier
    weka.classifiers.functions.RBFNetwork
    weka.classifiers.functions.RBFRegressor
    weka.classifiers.functions.SGD
    weka.classifiers.functions.SGDText
    weka.classifiers.functions.SimpleLinearRegression
    weka.classifiers.functions.SimpleLogistic
    weka.classifiers.functions.SMO
    weka.classifiers.functions.SMOreg
    weka.classifiers.functions.SPegasos
    weka.classifiers.functions.VotedPerceptron
    weka.classifiers.functions.Winnow
    weka.classifiers.lazy.AnalogicalModeling
    weka.classifiers.lazy.IB1
    weka.classifiers.lazy.IBk
    weka.classifiers.lazy.IBkLG
    weka.classifiers.lazy.KStar
    weka.classifiers.lazy.LBR
    weka.classifiers.lazy.LocalKnn
    weka.classifiers.lazy.LWL
    weka.classifiers.lazy.RseslibKnn
    weka.classifiers.meta.AdaBoostM1
    weka.classifiers.meta.AdditiveRegression
    weka.classifiers.meta.AggregateableFilteredClassifier
    weka.classifiers.meta.AggregateableFilteredClassifierUpdateable
    weka.classifiers.meta.AttributeSelectedClassifier
    weka.classifiers.meta.Bagging
    weka.classifiers.meta.BatchPredictorVote
    weka.classifiers.meta.ClassificationViaClustering
    weka.classifiers.meta.ClassificationViaRegression
    weka.classifiers.meta.CostSensitiveClassifier
    weka.classifiers.meta.Dagging
    weka.classifiers.meta.END
    weka.classifiers.meta.EnsembleSelection
    weka.classifiers.meta.FilteredClassifier
    weka.classifiers.meta.FilteredClassifierUpdateable
    weka.classifiers.meta.GridSearch
    weka.classifiers.meta.IterativeAbsoluteErrorRegression
    weka.classifiers.meta.IterativeClassifierOptimizer
    weka.classifiers.meta.LogitBoost
    weka.classifiers.meta.MetaCost
    weka.classifiers.meta.MOA
    weka.classifiers.meta.MultiBoostAB
    weka.classifiers.meta.MultiClassClassifier
    weka.classifiers.meta.MultiClassClassifierUpdateable
    weka.classifiers.meta.MultiScheme
    weka.classifiers.meta.MultiSearch
    weka.classifiers.meta.nestedDichotomies.ClassBalancedND
    weka.classifiers.meta.nestedDichotomies.DataNearBalancedND
    weka.classifiers.meta.nestedDichotomies.FurthestCentroidND
    weka.classifiers.meta.nestedDichotomies.ND
    weka.classifiers.meta.nestedDichotomies.RandomPairND
    weka.classifiers.meta.OneClassClassifier
    weka.classifiers.meta.OrdinalClassClassifier
    weka.classifiers.meta.RacedIncrementalLogitBoost
    weka.classifiers.meta.RandomCommittee
    weka.classifiers.meta.RandomizableFilteredClassifier
    weka.classifiers.meta.RandomSubSpace
    weka.classifiers.meta.RealAdaBoost
    weka.classifiers.meta.RotationForest
    weka.classifiers.meta.ThresholdSelector
    weka.classifiers.meta.Vote
    weka.classifiers.meta.WeightedInstancesHandlerWrapper
    weka.classifiers.mi.CitationKNN
    weka.classifiers.mi.MDD
    weka.classifiers.mi.MIBoost
    weka.classifiers.mi.MIDD
    weka.classifiers.mi.MIEMDD
    weka.classifiers.mi.MILR
    weka.classifiers.mi.MINND
    weka.classifiers.mi.MIOptimalBall
    weka.classifiers.mi.MIRI
    weka.classifiers.mi.MISMO
    weka.classifiers.mi.MISVM
    weka.classifiers.mi.MITI
    weka.classifiers.mi.MIWrapper
    weka.classifiers.mi.QuickDDIterative
    weka.classifiers.mi.SimpleMI
    weka.classifiers.mi.TLC
    weka.classifiers.mi.TLD
    weka.classifiers.mi.TLDSimple
    weka.classifiers.misc.CHIRP
    weka.classifiers.misc.FLR
    weka.classifiers.misc.HyperPipes
    weka.classifiers.misc.InputMappedClassifier
    weka.classifiers.misc.IsolationForest
    weka.classifiers.misc.LOF
    weka.classifiers.misc.OSDL
    weka.classifiers.misc.SerializedClassifier
    weka.classifiers.misc.VFI
    weka.classifiers.rules.ConjunctiveRule
    weka.classifiers.rules.DecisionTable
    weka.classifiers.rules.DTNB
    weka.classifiers.rules.LAC
    weka.classifiers.rules.M5Rules
    weka.classifiers.rules.MODLEM
    weka.classifiers.rules.MultiObjectiveEvolutionaryFuzzyClassifier
    weka.classifiers.rules.NNge
    weka.classifiers.rules.OLM
    weka.classifiers.rules.OneR
    weka.classifiers.rules.PART
    weka.classifiers.rules.Prism
    weka.classifiers.rules.Ridor
    weka.classifiers.rules.RoughSet
    weka.classifiers.rules.Vfdr
    weka.classifiers.rules.ZeroR
    weka.classifiers.scripting.GroovyClassifier
    weka.classifiers.scripting.JythonClassifier
    weka.classifiers.trees.ADTree
    weka.classifiers.trees.AlternatingModelTree
    weka.classifiers.trees.BFTree
    weka.classifiers.trees.CDT
    weka.classifiers.trees.DecisionStump
    weka.classifiers.trees.ExtraTree
    weka.classifiers.trees.FT
    weka.classifiers.trees.HoeffdingTree
    weka.classifiers.trees.Id3
    weka.classifiers.trees.IsolationForest
    weka.classifiers.trees.J48
    weka.classifiers.trees.J48Consolidated
    weka.classifiers.trees.J48graft
    weka.classifiers.trees.LADTree
    weka.classifiers.trees.LMT
    weka.classifiers.trees.M5P
    weka.classifiers.trees.NBTree
    weka.classifiers.trees.RandomForest
    weka.classifiers.trees.RandomTree
    weka.classifiers.trees.REPTree
    weka.classifiers.trees.SimpleCart
    weka.classifiers.trees.UserClassifier



    On 1/08/17, 2:59 AM, "Bradley E Harris" <
    [hidden email] on behalf of [hidden email]> wrote:

       Hi, Mark.
       Unfortunately neither the developer nor stable-3-8 branch snapshots as of July 31 work either with the weka.Run interface nor seem to load all the packages with
       weka.core.FindWithCapabilities
       I verified that my generic properties creator props file has UseDynamic=true set.
       my command lines are:
       java -Djava.awt.headless=true weka.Run weka.core.FindWithCapabilities -binary-class -numeric-atts -generic -superclass weka.classifiers.Classifier
       and
       sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -binary-class -numeric-atts -generic -superclass weka.classifiers.Classifier
       
       I'm using
       Java 1.8.0-141-B16
       on Centos 7
       if that helps.
       
       I'm not sure what's going on.  When I set
       java.awt.headless=true
       I get more errors from javax.
       
       For some reason, I get far fewer complaints using the developer branch snapshot.  In stable a lot of packages complain that they don't support Weka 3.8.2
       but neither snapshot seems to work with weka.Run or finds packages.
       
       Is there any further testing that I can do on my end?
       Thanks so much for working with this.
       
       Brad
       
       
       
       "Bradley E Harris" ---07/28/2017 10:33:10 AM---Hi, Mark. Thanks for the bug fix.  I'll test it on both stable and development
       
       From:        "Bradley E Harris" <
    [hidden email]>
       To:        "Weka machine learning workbench list." <
    [hidden email]>
       Date:        07/28/2017 10:33 AM
       Subject:        Re: [Wekalist] getting list of available classes including packages from command line
       Sent by:        
    [hidden email]
       
       ________________________________________
       
       
       
       Hi, Mark.
       
       Thanks for the bug fix. I'll test it on both stable and development branches and let you know. I definitely appreciate the fix. This one has bothered me ever since I couldn't figure out why my Java program didn't work. :)
       
       Also, thank you for implementing the CLI interface. This helps a lot. xvfb-run isn't difficult, but this makes things less resource intensive. :)
       
       Thanks,
       Brad
       
       
       Mark Hall ---07/27/2017 07:17:17 PM---Damn! I obviously didn't look too closely at the output generated by FindWithCapabilities :-) I've c
       
       From: Mark Hall <
    [hidden email]>
       To: "Weka machine learning workbench list." <
    [hidden email]>
       Date: 07/27/2017 07:17 PM
       Subject: Re: [Wekalist] getting list of available classes including packages from command line
       Sent by:
    [hidden email]
       ________________________________________
       
       
       
       Damn! I obviously didn't look too closely at the output generated by FindWithCapabilities :-) I've committed another fix to both trunk (3.9) and stable-3-8. FindWindCapabilities now uses WekaPackageClassloaderManager to instantiate potential matches instead of Class.forName() (which fails for package-based schemes). It also now implements CommandlineRunnable, so can be executed with weka.Run. The fix will be in the next nightly snapshot. Sorry for the confusion.
       
       Cheers,
       Mark.
       
       On 28/07/17, 5:51 AM, "Bradley E Harris" <
    [hidden email] on behalf of [hidden email]> wrote:
       
          Hi, Mark.
         
          I think I must be doing something wrong. I've downloaded 3.9.1, 3.8.1, stable-branch-3.8 and developer-branch
          and none of them seems to load the additional packages, even though the props file is set to UseDynamic=true
          Did I download the wrong branch or file?  I just finished testing both nightly snapshots.  I'm not sure what's going wrong.  Is it possible that the last snapshot was taken before you introduced the fix?  Did I download the wrong zip files?
          Do the packages lack the descriptor field that says, for example, that the package is a binary classifier?
          Perhaps it's loading packages and just not being able to match?
         
          On an odd note, weka.core.FindWithCapabilities doesn't work when preceeded by weka.Run
         
          Here is my command line:
          sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -binary-class -generic -superclass weka.classifiers.Classifier
          with $CLASSPATH set to
          /home/myuser/wekafiles/packages/snowball-stemmers/snowball-stemmers.jar:/home/myuser/bin/weka-stable-branch/weka/weka.jar
         
          Am I doing something wrong?
         
          Thanks,
          Brad
         
         
          Mark Hall ---07/26/2017 06:33:28 PM---The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trun
         
          From:        Mark Hall <
    [hidden email]>
          To:        "Weka machine learning workbench list." <
    [hidden email]>
          Date:        07/26/2017 06:33 PM
          Subject:        Re: [Wekalist] getting list of available classes including packages from command line
          Sent by:        
    [hidden email]
         
          ________________________________________
         
         
         
          The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trunk and stable-3-8 to rectify this. You can get the fix in the next nightly snapshot or from subversion. Thanks for the bug report.
         
          Cheers,
          Mark.
         
          On 27/07/17, 3:53 AM, "Bradley E Harris" <
    [hidden email] on behalf of [hidden email]> wrote:
         
              Hello, everyone.
              As a small adendum to my last post, I was able to get weka.core.FindWithCapabilities to print to the screen
              sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -superclass "weka.classifiers.Classifier" -generic
             
              lists all available classes.  I can also add things like
              -binary-class
              and filter that way.
              However, the problem from my last post remains.  Even though
              UseDynamic=true
              is set in the props file, the package-based classifiers still aren't being listed.
             
              Thanks,
              Brad Harris
             
             
              "Bradley E Harris" ---07/26/2017 10:44:16 AM---Hi, everyone. I am trying to get a list of all the available classes in weka including
             
              From:        "Bradley E Harris" <
    [hidden email]>
              To:        
    [hidden email]
              Date:        07/26/2017 10:44 AM
              Subject:        [Wekalist] getting list of available classes including packages        from command line
              Sent by:        
    [hidden email]
             
              ________________________________________
             
             
             
              Hi, everyone.
             
              I am trying to get a list of all the available classes in weka including the packages that I have added from the command line.
              I at first thought I could use weka.core.FindWithCapabilities, but there's no way to print out the results or write them to a file. I can get around the requirement for X11, but it has to have the ability to write to a file. So,
              I wrote a small java program that calls weka.gui.GenericPropertiesCreator, which is the suggestion I found on I believe an earlier post on this list. This is also the technique used by FindWithCapabilities.
              I am running on a headless display, and the code requires X11. So, to get around that I wrote the code to output to a file and used xvfb to run it. I used the GenericPropertiesCreator.props file from the weka src directory after verifying that it contained the
              UseDynamic=true
              statement, which is supposed to list items from all the loaded packages, or that's what I've read anyway.
              However, the generated file includes some packages but not others. For example, weka.classifiers.misc.IsolationForest doesn't show up in the resulting properties file. It also appears that NaiveBayesTree (or NBTree) is missing as well. However, things like AddativeRegression and MOA are there. My class path is set to point to weka.jar. Is weka not loading all available packages for some reason? I can, for example, access IsolationForest from the command line:
              java weka.Run weka.classifiers.misc.IsolationForest
              but it isn't in the generated properties file.
              Below is my java code. I have no clue how to write java, so I used a mixture of sample code, FindWithCapabilities.java and the documentation for weka.gui.GenericPropertiesCreator
              I'm sure I'm importing classes I don't need, but it doesn't seem to hurt it.
              It compiles with javac
              and, with my CLASSPATH variable set to point to weka.jar only it generates classifiers.properties with:
              sudo xvfb-run java list_classifiers
             
              ----------
              [myuser@localhost ~]$ more list_classifiers.java
              import weka.core.Capabilities.Capability;
              import weka.gui.GenericPropertiesCreator;
             
              import java.io.BufferedReader;
              import java.io.FileReader;
              import java.util.Enumeration;
              import java.util.Iterator;
              import java.util.Properties;
              import java.util.StringTokenizer;
              import java.util.Vector;
              public class list_classifiers {
              public static void main(String[] args) throws Exception {
              try {
              GenericPropertiesCreator creator;
             
              creator = new GenericPropertiesCreator("/home/myuser/GenericPropertiesCreator.props");
              creator.setExplicitPropsFile(true);
              creator.setOutputFilename("classifiers.properties");
              creator.execute(true, true);
              } catch(Exception e){
              }
             
              }
              }
             
              Does anyone know how to write out the rest of the available classifiers?
             
              Thanks,
              Brad Harris
             
             
              _______________________________________________
              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
         
         
         
         
         
          _______________________________________________
          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
       
       
       
       
       _______________________________________________
       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[attachment "graycol.gif" deleted by Bradley E Harris/Atlanta/IBM] _______________________________________________
    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

Re: getting list of available classes including packages from command line

Bradley E Harris
In reply to this post by Mark Hall

Hi, Mark.
Well, after fixing the scatterPlot3D issue at Eibe's suggestion, all the packages are loaded.
I'll install Oracle's JVM anyway. :)

Thanks so much for all your help, and for the amazing bug fix.
Brad


Inactive hide details for Mark Hall ---08/01/2017 05:14:48 PM---We recommend the use of an Oracle JVM. There have been various Mark Hall ---08/01/2017 05:14:48 PM---We recommend the use of an Oracle JVM. There have been various issues with Open JDK in the past. Che

From: Mark Hall <[hidden email]>
To: "Weka machine learning workbench list." <[hidden email]>
Date: 08/01/2017 05:14 PM
Subject: Re: [Wekalist] getting list of available classes including packages from command line
Sent by: [hidden email]





We recommend the use of an Oracle JVM. There have been various issues with Open JDK in the past.

Cheers,
Mark.

On 2/08/17, 5:48 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:

   Hi, Mark.
   I unfortunately get totally different results from yours, and I'm not sure why.  As you can see, X11 is still saying that it needs to start, and I'm not getting far enough to launch the class loader.
   I'm using the July 31st snapshot of developer-branch
   with openjdk 1.8.0-141
   As you can see, it still looks like it's trying to start the GUI.
   Am I doing something wrong?
   Thanks,
   Brad
   
   Here is what I get with your command:
   [myuser@localhost weka_output_files]$ java -Djava.awt.headless=true weka.Run .FindWithCapabilities -superclass weka.classifiers.Classifier -generic  2>&1
   [Weka] RPlugin can't be loaded because the environment variable R_HOME is not set.
   [Weka] RPlugin can't be loaded because the environment variable R_HOME is not set
   [Weka] Integrity: removing classloader for: RPlugin
   3D [dev] 1.6.0-pre12-daily-experimental daily
   
   Exception in thread "main" java.lang.ExceptionInInitializerError
           javax.media.j3d.NodeRetained.dirtyBoundsCache(NodeRetained.java:974)
           javax.media.j3d.Shape3DRetained.setGeometry(Shape3DRetained.java:368)
           javax.media.j3d.Shape3D.setGeometry(Shape3D.java:253)
           com.sun.j3d.utils.geometry.Text2D.updateText2D(Text2D.java:223)
           com.sun.j3d.utils.geometry.Text2D.<init>(Text2D.java:126)
           weka.gui.visualize.VisualizePanel3D.<clinit>(VisualizePanel3D.java:569)
           java.lang.Class.forName0(Native Method)
           java.lang.Class.forName(Class.java:348)
           weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:198)
           weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:178)
           weka.core.ClassDiscovery.find(ClassDiscovery.java:247)
           weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
           weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
           weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:615)
           weka.core.converters.ConverterResources.initialize(ConverterResources.java:168)
           weka.core.converters.ConverterUtils.initialize(ConverterUtils.java:688)
           weka.core.converters.ConverterUtils.<clinit>(ConverterUtils.java:684)
           java.lang.Class.forName0(Native Method)
           java.lang.Class.forName(Class.java:348)
           weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:198)
           weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:178)
           weka.core.ClassDiscovery.find(ClassDiscovery.java:247)
           weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
           weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
           weka.gui.GenericPropertiesCreator.<clinit>(GenericPropertiesCreator.java:167)
           weka.gui.GenericObjectEditor.determineClasses(GenericObjectEditor.java:200)
           weka.gui.GenericObjectEditor.<clinit>(GenericObjectEditor.java:263)
           weka.core.FindWithCapabilities.run(FindWithCapabilities.java:1058)
           weka.Run.main(Run.java:349)
   
           at javax.media.j3d.NodeRetained.dirtyBoundsCache(NodeRetained.java:974)
           at javax.media.j3d.Shape3DRetained.setGeometry(Shape3DRetained.java:368)
           at javax.media.j3d.Shape3D.setGeometry(Shape3D.java:253)
           at com.sun.j3d.utils.geometry.Text2D.updateText2D(Text2D.java:223)
           at com.sun.j3d.utils.geometry.Text2D.<init>(Text2D.java:126)
           at weka.gui.visualize.VisualizePanel3D.<clinit>(VisualizePanel3D.java:569)
           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.ClassDiscovery.find(ClassDiscovery.java:247)
           at weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
           at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
           at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:615)
           at weka.core.converters.ConverterResources.initialize(ConverterResources.java:168)
           at weka.core.converters.ConverterUtils.initialize(ConverterUtils.java:688)
           at weka.core.converters.ConverterUtils.<clinit>(ConverterUtils.java:684)
           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.ClassDiscovery.find(ClassDiscovery.java:247)
           at weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
           at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
           at weka.gui.GenericPropertiesCreator.<clinit>(GenericPropertiesCreator.java:167)
           at weka.gui.GenericObjectEditor.determineClasses(GenericObjectEditor.java:200)
           at weka.gui.GenericObjectEditor.<clinit>(GenericObjectEditor.java:263)
           at weka.core.FindWithCapabilities.run(FindWithCapabilities.java:1058)
           at weka.Run.main(Run.java:349)
   Caused by: java.awt.HeadlessException
           at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:269)
           ... 29 more
   [myuser@localhost weka_output_files]$
   
   Mark Hall ---07/31/2017 05:55:47 PM---I've just checked the developer nightly snapshot and it is working for me on my Mac. You are correct
   
   From:        Mark Hall <[hidden email]>
   To:        "Weka machine learning workbench list." <[hidden email]>
   Date:        07/31/2017 05:55 PM
   Subject:        Re: [Wekalist] getting list of available classes including packages from command line
   Sent by:        [hidden email]
   
   ________________________________________
   
   
   
   I've just checked the developer nightly snapshot and it is working for me on my Mac. You are correct that there are some fatal exceptions generated when headless is set to true, but these appear to be only from the scatterPlot3D and associationRulesVisualizer packages for me, and stem from 3rd party libraries used therein (we have no control over that). There is also a harmless exception (warning?) from dl4j that I've omitted from the output below:
   
   Selenium:weka mhall$ java -Djava.awt.headless=true -cp weka.jar weka.Run .FindWithCapabilities -superclass weka.classifiers.Classifier -generic
   Getting parent classloader....
   Injecting JRI classes into the root class loader...
   Trying systemwide default location for R under Mac OS...
   Trying to loaded R library from /Library/Frameworks/R.framework/Resources/library/rJava/jri/libjri.jnilib
   Engine class: class org.rosuda.JRI.Rengine ClassLoader:sun.misc.Launcher$ExtClassLoader@7cc355be
   Successfully loaded R library from /Library/Frameworks/R.framework/Resources/library/rJava/jri/libjri.jnilib
   Getting REngine....
   Setting a default package mirror in R...
   
   Searching for the following Capabilities:
   - allowed:
   - not allowed: -
   
   Found 163 classes that matched the criteria:
   
   weka.classifiers.bayes.BayesianLogisticRegression
   weka.classifiers.bayes.BayesNet
   weka.classifiers.bayes.ComplementNaiveBayes
   weka.classifiers.bayes.DMNBtext
   weka.classifiers.bayes.HMM
   weka.classifiers.bayes.HNB
   weka.classifiers.bayes.NaiveBayes
   weka.classifiers.bayes.NaiveBayesMultinomial
   weka.classifiers.bayes.NaiveBayesMultinomialText
   weka.classifiers.bayes.NaiveBayesMultinomialUpdateable
   weka.classifiers.bayes.NaiveBayesSimple
   weka.classifiers.bayes.NaiveBayesUpdateable
   weka.classifiers.bayes.SparseGenerativeModel
   weka.classifiers.functions.Dl4jMlpClassifier
   weka.classifiers.functions.ElasticNet
   weka.classifiers.functions.FLDA
   weka.classifiers.functions.GaussianProcesses
   weka.classifiers.functions.IsotonicRegression
   weka.classifiers.functions.KernelLogisticRegression
   weka.classifiers.functions.LDA
   weka.classifiers.functions.LeastMedSq
   weka.classifiers.functions.LibLINEAR
   weka.classifiers.functions.LibSVM
   weka.classifiers.functions.LinearRegression
   weka.classifiers.functions.Logistic
   weka.classifiers.functions.MLPClassifier
   weka.classifiers.functions.MLPRegressor
   weka.classifiers.functions.MultilayerPerceptron
   weka.classifiers.functions.MultilayerPerceptronCS
   weka.classifiers.functions.NonNegativeLogisticRegression
   weka.classifiers.functions.PaceRegression
   weka.classifiers.functions.PLSClassifier
   weka.classifiers.functions.QDA
   weka.classifiers.functions.RBFClassifier
   weka.classifiers.functions.RBFNetwork
   weka.classifiers.functions.RBFRegressor
   weka.classifiers.functions.SGD
   weka.classifiers.functions.SGDText
   weka.classifiers.functions.SimpleLinearRegression
   weka.classifiers.functions.SimpleLogistic
   weka.classifiers.functions.SMO
   weka.classifiers.functions.SMOreg
   weka.classifiers.functions.SPegasos
   weka.classifiers.functions.VotedPerceptron
   weka.classifiers.functions.Winnow
   weka.classifiers.lazy.AnalogicalModeling
   weka.classifiers.lazy.IB1
   weka.classifiers.lazy.IBk
   weka.classifiers.lazy.IBkLG
   weka.classifiers.lazy.KStar
   weka.classifiers.lazy.LBR
   weka.classifiers.lazy.LocalKnn
   weka.classifiers.lazy.LWL
   weka.classifiers.lazy.RseslibKnn
   weka.classifiers.meta.AdaBoostM1
   weka.classifiers.meta.AdditiveRegression
   weka.classifiers.meta.AggregateableFilteredClassifier
   weka.classifiers.meta.AggregateableFilteredClassifierUpdateable
   weka.classifiers.meta.AttributeSelectedClassifier
   weka.classifiers.meta.Bagging
   weka.classifiers.meta.BatchPredictorVote
   weka.classifiers.meta.ClassificationViaClustering
   weka.classifiers.meta.ClassificationViaRegression
   weka.classifiers.meta.CostSensitiveClassifier
   weka.classifiers.meta.Dagging
   weka.classifiers.meta.END
   weka.classifiers.meta.EnsembleSelection
   weka.classifiers.meta.FilteredClassifier
   weka.classifiers.meta.FilteredClassifierUpdateable
   weka.classifiers.meta.GridSearch
   weka.classifiers.meta.IterativeAbsoluteErrorRegression
   weka.classifiers.meta.IterativeClassifierOptimizer
   weka.classifiers.meta.LogitBoost
   weka.classifiers.meta.MetaCost
   weka.classifiers.meta.MOA
   weka.classifiers.meta.MultiBoostAB
   weka.classifiers.meta.MultiClassClassifier
   weka.classifiers.meta.MultiClassClassifierUpdateable
   weka.classifiers.meta.MultiScheme
   weka.classifiers.meta.MultiSearch
   weka.classifiers.meta.nestedDichotomies.ClassBalancedND
   weka.classifiers.meta.nestedDichotomies.DataNearBalancedND
   weka.classifiers.meta.nestedDichotomies.FurthestCentroidND
   weka.classifiers.meta.nestedDichotomies.ND
   weka.classifiers.meta.nestedDichotomies.RandomPairND
   weka.classifiers.meta.OneClassClassifier
   weka.classifiers.meta.OrdinalClassClassifier
   weka.classifiers.meta.RacedIncrementalLogitBoost
   weka.classifiers.meta.RandomCommittee
   weka.classifiers.meta.RandomizableFilteredClassifier
   weka.classifiers.meta.RandomSubSpace
   weka.classifiers.meta.RealAdaBoost
   weka.classifiers.meta.RotationForest
   weka.classifiers.meta.ThresholdSelector
   weka.classifiers.meta.Vote
   weka.classifiers.meta.WeightedInstancesHandlerWrapper
   weka.classifiers.mi.CitationKNN
   weka.classifiers.mi.MDD
   weka.classifiers.mi.MIBoost
   weka.classifiers.mi.MIDD
   weka.classifiers.mi.MIEMDD
   weka.classifiers.mi.MILR
   weka.classifiers.mi.MINND
   weka.classifiers.mi.MIOptimalBall
   weka.classifiers.mi.MIRI
   weka.classifiers.mi.MISMO
   weka.classifiers.mi.MISVM
   weka.classifiers.mi.MITI
   weka.classifiers.mi.MIWrapper
   weka.classifiers.mi.QuickDDIterative
   weka.classifiers.mi.SimpleMI
   weka.classifiers.mi.TLC
   weka.classifiers.mi.TLD
   weka.classifiers.mi.TLDSimple
   weka.classifiers.misc.CHIRP
   weka.classifiers.misc.FLR
   weka.classifiers.misc.HyperPipes
   weka.classifiers.misc.InputMappedClassifier
   weka.classifiers.misc.IsolationForest
   weka.classifiers.misc.LOF
   weka.classifiers.misc.OSDL
   weka.classifiers.misc.SerializedClassifier
   weka.classifiers.misc.VFI
   weka.classifiers.rules.ConjunctiveRule
   weka.classifiers.rules.DecisionTable
   weka.classifiers.rules.DTNB
   weka.classifiers.rules.LAC
   weka.classifiers.rules.M5Rules
   weka.classifiers.rules.MODLEM
   weka.classifiers.rules.MultiObjectiveEvolutionaryFuzzyClassifier
   weka.classifiers.rules.NNge
   weka.classifiers.rules.OLM
   weka.classifiers.rules.OneR
   weka.classifiers.rules.PART
   weka.classifiers.rules.Prism
   weka.classifiers.rules.Ridor
   weka.classifiers.rules.RoughSet
   weka.classifiers.rules.Vfdr
   weka.classifiers.rules.ZeroR
   weka.classifiers.scripting.GroovyClassifier
   weka.classifiers.scripting.JythonClassifier
   weka.classifiers.trees.ADTree
   weka.classifiers.trees.AlternatingModelTree
   weka.classifiers.trees.BFTree
   weka.classifiers.trees.CDT
   weka.classifiers.trees.DecisionStump
   weka.classifiers.trees.ExtraTree
   weka.classifiers.trees.FT
   weka.classifiers.trees.HoeffdingTree
   weka.classifiers.trees.Id3
   weka.classifiers.trees.IsolationForest
   weka.classifiers.trees.J48
   weka.classifiers.trees.J48Consolidated
   weka.classifiers.trees.J48graft
   weka.classifiers.trees.LADTree
   weka.classifiers.trees.LMT
   weka.classifiers.trees.M5P
   weka.classifiers.trees.NBTree
   weka.classifiers.trees.RandomForest
   weka.classifiers.trees.RandomTree
   weka.classifiers.trees.REPTree
   weka.classifiers.trees.SimpleCart
   weka.classifiers.trees.UserClassifier
   
   
   
   On 1/08/17, 2:59 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:
   
       Hi, Mark.
       Unfortunately neither the developer nor stable-3-8 branch snapshots as of July 31 work either with the weka.Run interface nor seem to load all the packages with
       weka.core.FindWithCapabilities
       I verified that my generic properties creator props file has UseDynamic=true set.
       my command lines are:
       java -Djava.awt.headless=true weka.Run weka.core.FindWithCapabilities -binary-class -numeric-atts -generic -superclass weka.classifiers.Classifier
       and
       sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -binary-class -numeric-atts -generic -superclass weka.classifiers.Classifier
       
       I'm using
       Java 1.8.0-141-B16
       on Centos 7
       if that helps.
       
       I'm not sure what's going on.  When I set
       java.awt.headless=true
       I get more errors from javax.
       
       For some reason, I get far fewer complaints using the developer branch snapshot.  In stable a lot of packages complain that they don't support Weka 3.8.2
       but neither snapshot seems to work with weka.Run or finds packages.
       
       Is there any further testing that I can do on my end?
       Thanks so much for working with this.
       
       Brad
       
       
       
       "Bradley E Harris" ---07/28/2017 10:33:10 AM---Hi, Mark. Thanks for the bug fix.  I'll test it on both stable and development
       
       From:        "Bradley E Harris" <[hidden email]>
       To:        "Weka machine learning workbench list." <[hidden email]>
       Date:        07/28/2017 10:33 AM
       Subject:        Re: [Wekalist] getting list of available classes including packages from command line
       Sent by:        [hidden email]
       
       ________________________________________
       
       
       
       Hi, Mark.
       
       Thanks for the bug fix. I'll test it on both stable and development branches and let you know. I definitely appreciate the fix. This one has bothered me ever since I couldn't figure out why my Java program didn't work. :)
       
       Also, thank you for implementing the CLI interface. This helps a lot. xvfb-run isn't difficult, but this makes things less resource intensive. :)
       
       Thanks,
       Brad
       
       
       Mark Hall ---07/27/2017 07:17:17 PM---Damn! I obviously didn't look too closely at the output generated by FindWithCapabilities :-) I've c
       
       From: Mark Hall <[hidden email]>
       To: "Weka machine learning workbench list." <[hidden email]>
       Date: 07/27/2017 07:17 PM
       Subject: Re: [Wekalist] getting list of available classes including packages from command line
       Sent by: [hidden email]
       ________________________________________
       
       
       
       Damn! I obviously didn't look too closely at the output generated by FindWithCapabilities :-) I've committed another fix to both trunk (3.9) and stable-3-8. FindWindCapabilities now uses WekaPackageClassloaderManager to instantiate potential matches instead of Class.forName() (which fails for package-based schemes). It also now implements CommandlineRunnable, so can be executed with weka.Run. The fix will be in the next nightly snapshot. Sorry for the confusion.
       
       Cheers,
       Mark.
       
       On 28/07/17, 5:51 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:
       
          Hi, Mark.
         
          I think I must be doing something wrong. I've downloaded 3.9.1, 3.8.1, stable-branch-3.8 and developer-branch
          and none of them seems to load the additional packages, even though the props file is set to UseDynamic=true
          Did I download the wrong branch or file?  I just finished testing both nightly snapshots.  I'm not sure what's going wrong.  Is it possible that the last snapshot was taken before you introduced the fix?  Did I download the wrong zip files?
          Do the packages lack the descriptor field that says, for example, that the package is a binary classifier?
          Perhaps it's loading packages and just not being able to match?
         
          On an odd note, weka.core.FindWithCapabilities doesn't work when preceeded by weka.Run
         
          Here is my command line:
          sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -binary-class -generic -superclass weka.classifiers.Classifier
          with $CLASSPATH set to
          /home/myuser/wekafiles/packages/snowball-stemmers/snowball-stemmers.jar:/home/myuser/bin/weka-stable-branch/weka/weka.jar
         
          Am I doing something wrong?
         
          Thanks,
          Brad
         
         
          Mark Hall ---07/26/2017 06:33:28 PM---The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trun
         
          From:        Mark Hall <[hidden email]>
          To:        "Weka machine learning workbench list." <[hidden email]>
          Date:        07/26/2017 06:33 PM
          Subject:        Re: [Wekalist] getting list of available classes including packages from command line
          Sent by:        [hidden email]
         
          ________________________________________
         
         
         
          The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trunk and stable-3-8 to rectify this. You can get the fix in the next nightly snapshot or from subversion. Thanks for the bug report.
         
          Cheers,
          Mark.
         
          On 27/07/17, 3:53 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:
         
              Hello, everyone.
              As a small adendum to my last post, I was able to get weka.core.FindWithCapabilities to print to the screen
              sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -superclass "weka.classifiers.Classifier" -generic
             
              lists all available classes.  I can also add things like
              -binary-class
              and filter that way.
              However, the problem from my last post remains.  Even though
              UseDynamic=true
              is set in the props file, the package-based classifiers still aren't being listed.
             
              Thanks,
              Brad Harris
             
             
              "Bradley E Harris" ---07/26/2017 10:44:16 AM---Hi, everyone. I am trying to get a list of all the available classes in weka including
             
              From:        "Bradley E Harris" <[hidden email]>
              To:        [hidden email]
              Date:        07/26/2017 10:44 AM
              Subject:        [Wekalist] getting list of available classes including packages        from command line
              Sent by:        [hidden email]
             
              ________________________________________
             
             
             
              Hi, everyone.
             
              I am trying to get a list of all the available classes in weka including the packages that I have added from the command line.
              I at first thought I could use weka.core.FindWithCapabilities, but there's no way to print out the results or write them to a file. I can get around the requirement for X11, but it has to have the ability to write to a file. So,
              I wrote a small java program that calls weka.gui.GenericPropertiesCreator, which is the suggestion I found on I believe an earlier post on this list. This is also the technique used by FindWithCapabilities.
              I am running on a headless display, and the code requires X11. So, to get around that I wrote the code to output to a file and used xvfb to run it. I used the GenericPropertiesCreator.props file from the weka src directory after verifying that it contained the
              UseDynamic=true
              statement, which is supposed to list items from all the loaded packages, or that's what I've read anyway.
              However, the generated file includes some packages but not others. For example, weka.classifiers.misc.IsolationForest doesn't show up in the resulting properties file. It also appears that NaiveBayesTree (or NBTree) is missing as well. However, things like AddativeRegression and MOA are there. My class path is set to point to weka.jar. Is weka not loading all available packages for some reason? I can, for example, access IsolationForest from the command line:
              java weka.Run weka.classifiers.misc.IsolationForest
              but it isn't in the generated properties file.
              Below is my java code. I have no clue how to write java, so I used a mixture of sample code, FindWithCapabilities.java and the documentation for weka.gui.GenericPropertiesCreator
              I'm sure I'm importing classes I don't need, but it doesn't seem to hurt it.
              It compiles with javac
              and, with my CLASSPATH variable set to point to weka.jar only it generates classifiers.properties with:
              sudo xvfb-run java list_classifiers
             
              ----------
              [myuser@localhost ~]$ more list_classifiers.java
              import weka.core.Capabilities.Capability;
              import weka.gui.GenericPropertiesCreator;
             
              import java.io.BufferedReader;
              import java.io.FileReader;
              import java.util.Enumeration;
              import java.util.Iterator;
              import java.util.Properties;
              import java.util.StringTokenizer;
              import java.util.Vector;
              public class list_classifiers {
              public static void main(String[] args) throws Exception {
              try {
              GenericPropertiesCreator creator;
             
              creator = new GenericPropertiesCreator("/home/myuser/GenericPropertiesCreator.props");
              creator.setExplicitPropsFile(true);
              creator.setOutputFilename("classifiers.properties");
              creator.execute(true, true);
              } catch(Exception e){
              }
             
              }
              }
             
              Does anyone know how to write out the rest of the available classifiers?
             
              Thanks,
              Brad Harris
             
             
              _______________________________________________
              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
         
         
         
         
         
          _______________________________________________
          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
       
       
       
       
       _______________________________________________
       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
   


_______________________________________________
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

Re: getting list of available classes including packages from command line

Mark Hall
OK, I did mention that scatterPlot3D (and associationRulesVisualizer, which depends on it) generates fatal exceptions in headless mode in my email. I guess I should have said explicitly to uninstall/disable it :-)

Cheers,
Mark.

On 3/08/17, 5:21 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:

    Hi, Mark.
    Well, after fixing the scatterPlot3D issue at Eibe's suggestion, all the packages are loaded.
    I'll install Oracle's JVM anyway. :)
   
    Thanks so much for all your help, and for the amazing bug fix.
    Brad
   
   
    Mark Hall ---08/01/2017 05:14:48 PM---We recommend the use of an Oracle JVM. There have been various issues with Open JDK in the past. Che
   
    From:        Mark Hall <[hidden email]>
    To:        "Weka machine learning workbench list." <[hidden email]>
    Date:        08/01/2017 05:14 PM
    Subject:        Re: [Wekalist] getting list of available classes including packages from command line
    Sent by:        [hidden email]
   
    ________________________________________
   
   
   
    We recommend the use of an Oracle JVM. There have been various issues with Open JDK in the past.
   
    Cheers,
    Mark.
   
    On 2/08/17, 5:48 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:
   
        Hi, Mark.
        I unfortunately get totally different results from yours, and I'm not sure why.  As you can see, X11 is still saying that it needs to start, and I'm not getting far enough to launch the class loader.
        I'm using the July 31st snapshot of developer-branch
        with openjdk 1.8.0-141
        As you can see, it still looks like it's trying to start the GUI.
        Am I doing something wrong?
        Thanks,
        Brad
       
        Here is what I get with your command:
        [myuser@localhost weka_output_files]$ java -Djava.awt.headless=true weka.Run .FindWithCapabilities -superclass weka.classifiers.Classifier -generic  2>&1
        [Weka] RPlugin can't be loaded because the environment variable R_HOME is not set.
        [Weka] RPlugin can't be loaded because the environment variable R_HOME is not set
        [Weka] Integrity: removing classloader for: RPlugin
        3D [dev] 1.6.0-pre12-daily-experimental daily
       
        Exception in thread "main" java.lang.ExceptionInInitializerError
                javax.media.j3d.NodeRetained.dirtyBoundsCache(NodeRetained.java:974)
                javax.media.j3d.Shape3DRetained.setGeometry(Shape3DRetained.java:368)
                javax.media.j3d.Shape3D.setGeometry(Shape3D.java:253)
                com.sun.j3d.utils.geometry.Text2D.updateText2D(Text2D.java:223)
                com.sun.j3d.utils.geometry.Text2D.<init>(Text2D.java:126)
                weka.gui.visualize.VisualizePanel3D.<clinit>(VisualizePanel3D.java:569)
                java.lang.Class.forName0(Native Method)
                java.lang.Class.forName(Class.java:348)
                weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:198)
                weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:178)
                weka.core.ClassDiscovery.find(ClassDiscovery.java:247)
                weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
                weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
                weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:615)
                weka.core.converters.ConverterResources.initialize(ConverterResources.java:168)
                weka.core.converters.ConverterUtils.initialize(ConverterUtils.java:688)
                weka.core.converters.ConverterUtils.<clinit>(ConverterUtils.java:684)
                java.lang.Class.forName0(Native Method)
                java.lang.Class.forName(Class.java:348)
                weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:198)
                weka.core.WekaPackageClassLoaderManager.forName(WekaPackageClassLoaderManager.java:178)
                weka.core.ClassDiscovery.find(ClassDiscovery.java:247)
                weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
                weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
                weka.gui.GenericPropertiesCreator.<clinit>(GenericPropertiesCreator.java:167)
                weka.gui.GenericObjectEditor.determineClasses(GenericObjectEditor.java:200)
                weka.gui.GenericObjectEditor.<clinit>(GenericObjectEditor.java:263)
                weka.core.FindWithCapabilities.run(FindWithCapabilities.java:1058)
                weka.Run.main(Run.java:349)
       
                at javax.media.j3d.NodeRetained.dirtyBoundsCache(NodeRetained.java:974)
                at javax.media.j3d.Shape3DRetained.setGeometry(Shape3DRetained.java:368)
                at javax.media.j3d.Shape3D.setGeometry(Shape3D.java:253)
                at com.sun.j3d.utils.geometry.Text2D.updateText2D(Text2D.java:223)
                at com.sun.j3d.utils.geometry.Text2D.<init>(Text2D.java:126)
                at weka.gui.visualize.VisualizePanel3D.<clinit>(VisualizePanel3D.java:569)
                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.ClassDiscovery.find(ClassDiscovery.java:247)
                at weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
                at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
                at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:615)
                at weka.core.converters.ConverterResources.initialize(ConverterResources.java:168)
                at weka.core.converters.ConverterUtils.initialize(ConverterUtils.java:688)
                at weka.core.converters.ConverterUtils.<clinit>(ConverterUtils.java:684)
                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.ClassDiscovery.find(ClassDiscovery.java:247)
                at weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:542)
                at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:639)
                at weka.gui.GenericPropertiesCreator.<clinit>(GenericPropertiesCreator.java:167)
                at weka.gui.GenericObjectEditor.determineClasses(GenericObjectEditor.java:200)
                at weka.gui.GenericObjectEditor.<clinit>(GenericObjectEditor.java:263)
                at weka.core.FindWithCapabilities.run(FindWithCapabilities.java:1058)
                at weka.Run.main(Run.java:349)
        Caused by: java.awt.HeadlessException
                at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:269)
                ... 29 more
        [myuser@localhost weka_output_files]$
       
        Mark Hall ---07/31/2017 05:55:47 PM---I've just checked the developer nightly snapshot and it is working for me on my Mac. You are correct
       
        From:        Mark Hall <[hidden email]>
        To:        "Weka machine learning workbench list." <[hidden email]>
        Date:        07/31/2017 05:55 PM
        Subject:        Re: [Wekalist] getting list of available classes including packages from command line
        Sent by:        [hidden email]
       
        ________________________________________
       
       
       
        I've just checked the developer nightly snapshot and it is working for me on my Mac. You are correct that there are some fatal exceptions generated when headless is set to true, but these appear to be only from the scatterPlot3D and associationRulesVisualizer packages for me, and stem from 3rd party libraries used therein (we have no control over that). There is also a harmless exception (warning?) from dl4j that I've omitted from the output below:
       
        Selenium:weka mhall$ java -Djava.awt.headless=true -cp weka.jar weka.Run .FindWithCapabilities -superclass weka.classifiers.Classifier -generic
        Getting parent classloader....
        Injecting JRI classes into the root class loader...
        Trying systemwide default location for R under Mac OS...
        Trying to loaded R library from /Library/Frameworks/R.framework/Resources/library/rJava/jri/libjri.jnilib
        Engine class: class org.rosuda.JRI.Rengine ClassLoader:sun.misc.Launcher$ExtClassLoader@7cc355be
        Successfully loaded R library from /Library/Frameworks/R.framework/Resources/library/rJava/jri/libjri.jnilib
        Getting REngine....
        Setting a default package mirror in R...
       
        Searching for the following Capabilities:
        - allowed:
        - not allowed: -
       
        Found 163 classes that matched the criteria:
       
        weka.classifiers.bayes.BayesianLogisticRegression
        weka.classifiers.bayes.BayesNet
        weka.classifiers.bayes.ComplementNaiveBayes
        weka.classifiers.bayes.DMNBtext
        weka.classifiers.bayes.HMM
        weka.classifiers.bayes.HNB
        weka.classifiers.bayes.NaiveBayes
        weka.classifiers.bayes.NaiveBayesMultinomial
        weka.classifiers.bayes.NaiveBayesMultinomialText
        weka.classifiers.bayes.NaiveBayesMultinomialUpdateable
        weka.classifiers.bayes.NaiveBayesSimple
        weka.classifiers.bayes.NaiveBayesUpdateable
        weka.classifiers.bayes.SparseGenerativeModel
        weka.classifiers.functions.Dl4jMlpClassifier
        weka.classifiers.functions.ElasticNet
        weka.classifiers.functions.FLDA
        weka.classifiers.functions.GaussianProcesses
        weka.classifiers.functions.IsotonicRegression
        weka.classifiers.functions.KernelLogisticRegression
        weka.classifiers.functions.LDA
        weka.classifiers.functions.LeastMedSq
        weka.classifiers.functions.LibLINEAR
        weka.classifiers.functions.LibSVM
        weka.classifiers.functions.LinearRegression
        weka.classifiers.functions.Logistic
        weka.classifiers.functions.MLPClassifier
        weka.classifiers.functions.MLPRegressor
        weka.classifiers.functions.MultilayerPerceptron
        weka.classifiers.functions.MultilayerPerceptronCS
        weka.classifiers.functions.NonNegativeLogisticRegression
        weka.classifiers.functions.PaceRegression
        weka.classifiers.functions.PLSClassifier
        weka.classifiers.functions.QDA
        weka.classifiers.functions.RBFClassifier
        weka.classifiers.functions.RBFNetwork
        weka.classifiers.functions.RBFRegressor
        weka.classifiers.functions.SGD
        weka.classifiers.functions.SGDText
        weka.classifiers.functions.SimpleLinearRegression
        weka.classifiers.functions.SimpleLogistic
        weka.classifiers.functions.SMO
        weka.classifiers.functions.SMOreg
        weka.classifiers.functions.SPegasos
        weka.classifiers.functions.VotedPerceptron
        weka.classifiers.functions.Winnow
        weka.classifiers.lazy.AnalogicalModeling
        weka.classifiers.lazy.IB1
        weka.classifiers.lazy.IBk
        weka.classifiers.lazy.IBkLG
        weka.classifiers.lazy.KStar
        weka.classifiers.lazy.LBR
        weka.classifiers.lazy.LocalKnn
        weka.classifiers.lazy.LWL
        weka.classifiers.lazy.RseslibKnn
        weka.classifiers.meta.AdaBoostM1
        weka.classifiers.meta.AdditiveRegression
        weka.classifiers.meta.AggregateableFilteredClassifier
        weka.classifiers.meta.AggregateableFilteredClassifierUpdateable
        weka.classifiers.meta.AttributeSelectedClassifier
        weka.classifiers.meta.Bagging
        weka.classifiers.meta.BatchPredictorVote
        weka.classifiers.meta.ClassificationViaClustering
        weka.classifiers.meta.ClassificationViaRegression
        weka.classifiers.meta.CostSensitiveClassifier
        weka.classifiers.meta.Dagging
        weka.classifiers.meta.END
        weka.classifiers.meta.EnsembleSelection
        weka.classifiers.meta.FilteredClassifier
        weka.classifiers.meta.FilteredClassifierUpdateable
        weka.classifiers.meta.GridSearch
        weka.classifiers.meta.IterativeAbsoluteErrorRegression
        weka.classifiers.meta.IterativeClassifierOptimizer
        weka.classifiers.meta.LogitBoost
        weka.classifiers.meta.MetaCost
        weka.classifiers.meta.MOA
        weka.classifiers.meta.MultiBoostAB
        weka.classifiers.meta.MultiClassClassifier
        weka.classifiers.meta.MultiClassClassifierUpdateable
        weka.classifiers.meta.MultiScheme
        weka.classifiers.meta.MultiSearch
        weka.classifiers.meta.nestedDichotomies.ClassBalancedND
        weka.classifiers.meta.nestedDichotomies.DataNearBalancedND
        weka.classifiers.meta.nestedDichotomies.FurthestCentroidND
        weka.classifiers.meta.nestedDichotomies.ND
        weka.classifiers.meta.nestedDichotomies.RandomPairND
        weka.classifiers.meta.OneClassClassifier
        weka.classifiers.meta.OrdinalClassClassifier
        weka.classifiers.meta.RacedIncrementalLogitBoost
        weka.classifiers.meta.RandomCommittee
        weka.classifiers.meta.RandomizableFilteredClassifier
        weka.classifiers.meta.RandomSubSpace
        weka.classifiers.meta.RealAdaBoost
        weka.classifiers.meta.RotationForest
        weka.classifiers.meta.ThresholdSelector
        weka.classifiers.meta.Vote
        weka.classifiers.meta.WeightedInstancesHandlerWrapper
        weka.classifiers.mi.CitationKNN
        weka.classifiers.mi.MDD
        weka.classifiers.mi.MIBoost
        weka.classifiers.mi.MIDD
        weka.classifiers.mi.MIEMDD
        weka.classifiers.mi.MILR
        weka.classifiers.mi.MINND
        weka.classifiers.mi.MIOptimalBall
        weka.classifiers.mi.MIRI
        weka.classifiers.mi.MISMO
        weka.classifiers.mi.MISVM
        weka.classifiers.mi.MITI
        weka.classifiers.mi.MIWrapper
        weka.classifiers.mi.QuickDDIterative
        weka.classifiers.mi.SimpleMI
        weka.classifiers.mi.TLC
        weka.classifiers.mi.TLD
        weka.classifiers.mi.TLDSimple
        weka.classifiers.misc.CHIRP
        weka.classifiers.misc.FLR
        weka.classifiers.misc.HyperPipes
        weka.classifiers.misc.InputMappedClassifier
        weka.classifiers.misc.IsolationForest
        weka.classifiers.misc.LOF
        weka.classifiers.misc.OSDL
        weka.classifiers.misc.SerializedClassifier
        weka.classifiers.misc.VFI
        weka.classifiers.rules.ConjunctiveRule
        weka.classifiers.rules.DecisionTable
        weka.classifiers.rules.DTNB
        weka.classifiers.rules.LAC
        weka.classifiers.rules.M5Rules
        weka.classifiers.rules.MODLEM
        weka.classifiers.rules.MultiObjectiveEvolutionaryFuzzyClassifier
        weka.classifiers.rules.NNge
        weka.classifiers.rules.OLM
        weka.classifiers.rules.OneR
        weka.classifiers.rules.PART
        weka.classifiers.rules.Prism
        weka.classifiers.rules.Ridor
        weka.classifiers.rules.RoughSet
        weka.classifiers.rules.Vfdr
        weka.classifiers.rules.ZeroR
        weka.classifiers.scripting.GroovyClassifier
        weka.classifiers.scripting.JythonClassifier
        weka.classifiers.trees.ADTree
        weka.classifiers.trees.AlternatingModelTree
        weka.classifiers.trees.BFTree
        weka.classifiers.trees.CDT
        weka.classifiers.trees.DecisionStump
        weka.classifiers.trees.ExtraTree
        weka.classifiers.trees.FT
        weka.classifiers.trees.HoeffdingTree
        weka.classifiers.trees.Id3
        weka.classifiers.trees.IsolationForest
        weka.classifiers.trees.J48
        weka.classifiers.trees.J48Consolidated
        weka.classifiers.trees.J48graft
        weka.classifiers.trees.LADTree
        weka.classifiers.trees.LMT
        weka.classifiers.trees.M5P
        weka.classifiers.trees.NBTree
        weka.classifiers.trees.RandomForest
        weka.classifiers.trees.RandomTree
        weka.classifiers.trees.REPTree
        weka.classifiers.trees.SimpleCart
        weka.classifiers.trees.UserClassifier
       
       
       
        On 1/08/17, 2:59 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:
       
            Hi, Mark.
            Unfortunately neither the developer nor stable-3-8 branch snapshots as of July 31 work either with the weka.Run interface nor seem to load all the packages with
            weka.core.FindWithCapabilities
            I verified that my generic properties creator props file has UseDynamic=true set.
            my command lines are:
            java -Djava.awt.headless=true weka.Run weka.core.FindWithCapabilities -binary-class -numeric-atts -generic -superclass weka.classifiers.Classifier
            and
            sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -binary-class -numeric-atts -generic -superclass weka.classifiers.Classifier
           
            I'm using
            Java 1.8.0-141-B16
            on Centos 7
            if that helps.
           
            I'm not sure what's going on.  When I set
            java.awt.headless=true
            I get more errors from javax.
           
            For some reason, I get far fewer complaints using the developer branch snapshot.  In stable a lot of packages complain that they don't support Weka 3.8.2
            but neither snapshot seems to work with weka.Run or finds packages.
           
            Is there any further testing that I can do on my end?
            Thanks so much for working with this.
           
            Brad
           
           
           
            "Bradley E Harris" ---07/28/2017 10:33:10 AM---Hi, Mark. Thanks for the bug fix.  I'll test it on both stable and development
           
            From:        "Bradley E Harris" <[hidden email]>
            To:        "Weka machine learning workbench list." <[hidden email]>
            Date:        07/28/2017 10:33 AM
            Subject:        Re: [Wekalist] getting list of available classes including packages from command line
            Sent by:        [hidden email]
           
            ________________________________________
           
           
           
            Hi, Mark.
           
            Thanks for the bug fix. I'll test it on both stable and development branches and let you know. I definitely appreciate the fix. This one has bothered me ever since I couldn't figure out why my Java program didn't work. :)
           
            Also, thank you for implementing the CLI interface. This helps a lot. xvfb-run isn't difficult, but this makes things less resource intensive. :)
           
            Thanks,
            Brad
           
           
            Mark Hall ---07/27/2017 07:17:17 PM---Damn! I obviously didn't look too closely at the output generated by FindWithCapabilities :-) I've c
           
            From: Mark Hall <[hidden email]>
            To: "Weka machine learning workbench list." <[hidden email]>
            Date: 07/27/2017 07:17 PM
            Subject: Re: [Wekalist] getting list of available classes including packages from command line
            Sent by: [hidden email]
            ________________________________________
           
           
           
            Damn! I obviously didn't look too closely at the output generated by FindWithCapabilities :-) I've committed another fix to both trunk (3.9) and stable-3-8. FindWindCapabilities now uses WekaPackageClassloaderManager to instantiate potential matches instead of Class.forName() (which fails for package-based schemes). It also now implements CommandlineRunnable, so can be executed with weka.Run. The fix will be in the next nightly snapshot. Sorry for the confusion.
           
            Cheers,
            Mark.
           
            On 28/07/17, 5:51 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:
           
               Hi, Mark.
               
               I think I must be doing something wrong. I've downloaded 3.9.1, 3.8.1, stable-branch-3.8 and developer-branch
               and none of them seems to load the additional packages, even though the props file is set to UseDynamic=true
               Did I download the wrong branch or file?  I just finished testing both nightly snapshots.  I'm not sure what's going wrong.  Is it possible that the last snapshot was taken before you introduced the fix?  Did I download the wrong zip files?
               Do the packages lack the descriptor field that says, for example, that the package is a binary classifier?
               Perhaps it's loading packages and just not being able to match?
               
               On an odd note, weka.core.FindWithCapabilities doesn't work when preceeded by weka.Run
               
               Here is my command line:
               sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -binary-class -generic -superclass weka.classifiers.Classifier
               with $CLASSPATH set to
               /home/myuser/wekafiles/packages/snowball-stemmers/snowball-stemmers.jar:/home/myuser/bin/weka-stable-branch/weka/weka.jar
               
               Am I doing something wrong?
               
               Thanks,
               Brad
               
               
               Mark Hall ---07/26/2017 06:33:28 PM---The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trun
               
               From:        Mark Hall <[hidden email]>
               To:        "Weka machine learning workbench list." <[hidden email]>
               Date:        07/26/2017 06:33 PM
               Subject:        Re: [Wekalist] getting list of available classes including packages from command line
               Sent by:        [hidden email]
               
               ________________________________________
               
               
               
               The main method in FindWidthCapabilities was not loading packages. I've just committed a fix to trunk and stable-3-8 to rectify this. You can get the fix in the next nightly snapshot or from subversion. Thanks for the bug report.
               
               Cheers,
               Mark.
               
               On 27/07/17, 3:53 AM, "Bradley E Harris" <[hidden email] on behalf of [hidden email]> wrote:
               
                   Hello, everyone.
                   As a small adendum to my last post, I was able to get weka.core.FindWithCapabilities to print to the screen
                   sudo xvfb-run java -cp $CLASSPATH weka.core.FindWithCapabilities -superclass "weka.classifiers.Classifier" -generic
                   
                   lists all available classes.  I can also add things like
                   -binary-class
                   and filter that way.
                   However, the problem from my last post remains.  Even though
                   UseDynamic=true
                   is set in the props file, the package-based classifiers still aren't being listed.
                   
                   Thanks,
                   Brad Harris
                   
                   
                   "Bradley E Harris" ---07/26/2017 10:44:16 AM---Hi, everyone. I am trying to get a list of all the available classes in weka including
                   
                   From:        "Bradley E Harris" <[hidden email]>
                   To:        [hidden email]
                   Date:        07/26/2017 10:44 AM
                   Subject:        [Wekalist] getting list of available classes including packages        from command line
                   Sent by:        [hidden email]
                   
                   ________________________________________
                   
                   
                   
                   Hi, everyone.
                   
                   I am trying to get a list of all the available classes in weka including the packages that I have added from the command line.
                   I at first thought I could use weka.core.FindWithCapabilities, but there's no way to print out the results or write them to a file. I can get around the requirement for X11, but it has to have the ability to write to a file. So,
                   I wrote a small java program that calls weka.gui.GenericPropertiesCreator, which is the suggestion I found on I believe an earlier post on this list. This is also the technique used by FindWithCapabilities.
                   I am running on a headless display, and the code requires X11. So, to get around that I wrote the code to output to a file and used xvfb to run it. I used the GenericPropertiesCreator.props file from the weka src directory after verifying that it contained the
                   UseDynamic=true
                   statement, which is supposed to list items from all the loaded packages, or that's what I've read anyway.
                   However, the generated file includes some packages but not others. For example, weka.classifiers.misc.IsolationForest doesn't show up in the resulting properties file. It also appears that NaiveBayesTree (or NBTree) is missing as well. However, things like AddativeRegression and MOA are there. My class path is set to point to weka.jar. Is weka not loading all available packages for some reason? I can, for example, access IsolationForest from the command line:
                   java weka.Run weka.classifiers.misc.IsolationForest
                   but it isn't in the generated properties file.
                   Below is my java code. I have no clue how to write java, so I used a mixture of sample code, FindWithCapabilities.java and the documentation for weka.gui.GenericPropertiesCreator
                   I'm sure I'm importing classes I don't need, but it doesn't seem to hurt it.
                   It compiles with javac
                   and, with my CLASSPATH variable set to point to weka.jar only it generates classifiers.properties with:
                   sudo xvfb-run java list_classifiers
                   
                   ----------
                   [myuser@localhost ~]$ more list_classifiers.java
                   import weka.core.Capabilities.Capability;
                   import weka.gui.GenericPropertiesCreator;
                   
                   import java.io.BufferedReader;
                   import java.io.FileReader;
                   import java.util.Enumeration;
                   import java.util.Iterator;
                   import java.util.Properties;
                   import java.util.StringTokenizer;
                   import java.util.Vector;
                   public class list_classifiers {
                   public static void main(String[] args) throws Exception {
                   try {
                   GenericPropertiesCreator creator;
                   
                   creator = new GenericPropertiesCreator("/home/myuser/GenericPropertiesCreator.props");
                   creator.setExplicitPropsFile(true);
                   creator.setOutputFilename("classifiers.properties");
                   creator.execute(true, true);
                   } catch(Exception e){
                   }
                   
                   }
                   }
                   
                   Does anyone know how to write out the rest of the available classifiers?
                   
                   Thanks,
                   Brad Harris
                   
                   
                   _______________________________________________
                   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
               
               
               
               
               
               _______________________________________________
               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
           
           
           
           
            _______________________________________________
            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
       
   
   
    _______________________________________________
    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...