Re: Wekalist Digest, Vol 252, Issue 1

Michele Basile <[email protected]> Wed, 7 Feb 2024 19:20:50 +0100
Newsgroups gmane.comp.ai.weka
Message-ID <CAP_bkXa4dco1Q0qK=jQ2oezyAmSKCWFCCoFmYuAoWedmZ8SfjQ@mail.gmail.com>
Dear Wekalist,

I have tried to install WEKA and it is not working.The situation is the
following:

Environment variable 'JAVA_OPTS' does not exist!
Environment variable 'CLASSPATH' does not exist!
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by
weka.gui.GUIChooserApp (file:/C:/Program%20Files/Weka-3-8-6/weka.jar)
WARNING: Please consider reporting this to the maintainers of
weka.gui.GUIChooserApp
WARNING: System::setSecurityManager will be removed in a future release

Can you help?

Look forward to hearing from you

Kind regards

Michele


On Wed, 7 Feb 2024 at 12:01, <[email protected]> wrote:

> Send Wekalist mailing list submissions to
>         [email protected]
>
> To subscribe or unsubscribe via email, send a message with subject or
> body 'help' to
>         [email protected]
>
> You can reach the person managing the list at
>         [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Wekalist digest..."
>
> Today's Topics:
>
>    1. Re: How to classify unseen multi instance data? (Peter Reutemann)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 7 Feb 2024 10:58:30 +1300
> From: Peter Reutemann <[email protected]>
> Subject: [Wekalist] Re: How to classify unseen multi instance data?
> To: "Weka machine learning workbench list."
>         <[email protected]>
> Message-ID:
>         <
> CAHoQ12JsgCWn5fs29dHc0K5VS_ekGGHfkpEBquhFmYFac0uBgw@mail.gmail.com>
> Content-Type: multipart/mixed; boundary="000000000000c5edb60610bdae42"
>
> Apologies, took a bit longer to reply, had a lot of work going on...
>
> > >>> At prediction time you re-use (rather than re-create) the header from
> > >>> the training data to create new Instance objects. These Instance
> > >>> objects you then present to the classifier to obtain predictions.
> > >>
> > >> Are there any examples for how this procedure works with
> multi-instance
> > >> data?
> > >
> > > There is no difference to non-multi-instance data.
> > > The wiki example demonstrates how to fill a relational attribute with
> > > values (I may have already posted that before):
> > >
> https://waikato.github.io/weka-wiki/formats_and_processing/creating_arff_file/
> >
> > I meant actual Java code that demonstrates how to re-use an existing
> > header during classification. I did not find any such examples and could
> > not get it to work myself.
>
> See attached example code that trains a MIWrapper classifier on the
> east-west relational dataset (also attached), serializes the
> model/header, reloads the models/header, makes predictions on data.
>
> > > It depends. If you've saved a model with the Explorer, then it would
> > > contain the header (an empty Instances object with the structure) as
> > > the second object in the serialized file.
> >
> > If that was the case, then shouldn't I find a call to
> > SerializationHelper.writeAll somewhere in the Weka sources? However,
> > there's only SerializationHelper.write in core/Debug.java. I downloaded
> > the sources from
> https://git.cms.waikato.ac.nz/weka/weka/-/tree/main/trunk
> >
> > > If you don't actually save your model anywhere, but just keep in
> > > memory, then you would create an empty copy of the training data with
> > > something like:
> > > Instances train = ...  // your training data
> > > Instances header = new Instances(train, 0);
> >
> > When I create the header like that and save it with the
> > SerializationHelper I am getting a file of 110MB, of which the actual
> > classifier has less than 1 MB. So somehow this header appears to be very
> > large, even though it does not contain any instances. My guess is that
> > it still contains all the instances from the training data, even though
> > they're not accessible anymore.
>
> The problem is that the relational attribute values are still being
> kept (I never really used such data much). You can use the
> stringFreeStructure method to remove unnecessary references:
>
> https://weka.sourceforge.io/doc.dev/weka/core/Instances.html#stringFreeStructure--
>
> NB: This method dates back to days before relational attributes were a
> thing, when string attributes required cleaning up.
>
> > >>> The RELAGGS filter is specifically designed for processing data from
> a
> > >>> relational database (the original code worked straight off JDBC
> > >>> databases):
> > >>>
> https://weka.sourceforge.io/doc.stable/weka/filters/unsupervised/attribute/RELAGGS.html
> > >>
> > >> Are there any examples how to use this filter in Java? What kind of
> > >> processing does it do?
> > >
> > > You can apply it straight to your multi-instance data. Works just like
> > > any other filter.
> >
> > Yes, sure, but what does this filter actually do? What is my benefit
> > from using it?
>
> RELAGGS uses SQL aggregation methods like COUNT, MIN, MAX, AVG, SUM,
> etc on the relational data to flatten it into a propositional, single
> table.
> A long time ago, when I was working with relational/multi-instance
> data, algorithms trained on the RELAGGS-flattened data tended to
> outperform other multi-instance algorithms that worked on the
> multi-instance data.
>
> Cheers, Peter
> --
> Peter Reutemann
> Dept. of Computer Science
> University of Waikato, Hamilton, NZ
> Mobile +64 22 190 2375
> https://www.cs.waikato.ac.nz/~fracpete/
> http://www.data-mining.co.nz/
> -------------- next part --------------
> A message part incompatible with plain text digests has been removed ...
> Name: MultiInstData.java
> Type: text/x-java
> Size: 3993 bytes
> Desc: not available
> -------------- next part --------------
> A message part incompatible with plain text digests has been removed ...
> Name: eastwest_relational.arff
> Type: application/octet-stream
> Size: 11600 bytes
> Desc: not available
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Wekalist mailing list -- [email protected]
> Send posts to [email protected]
> To unsubscribe send an email to [email protected]
> To subscribe, unsubscribe, etc., visit
> https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>
>
> ------------------------------
>
> End of Wekalist Digest, Vol 252, Issue 1
> ****************************************
>


-- 

*Michele BASILE*

*Principal Systems Engineer/Data Scientist*


*EDF Project Coordinator*

*AOS SARL*

*1, Rue Montoyer -1000 Brussels*


*[email protected] <[email protected]>*


*DISCLAIMER:* *This e-mail message and attachments thereto are intended
solely for the recipient and may contain confidential and privileged
information. Any unauthorised review, use, disclosure, or distribution is
prohibited. If you have received the e-mail by mistake, please contact the
sender or reply e-mail and delete the e-mail and its attachments (where
appropriate) from your system.*

_______________________________________________
Wekalist mailing list -- [email protected]
Send posts to [email protected]
To unsubscribe send an email to [email protected]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html