Question about ArffLoader behaviour and possible bug in weka.core.Instance

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

Question about ArffLoader behaviour and possible bug in weka.core.Instance

Christian Huber
Hi there,

sorry if this has been adresses earlier, but i searched the mailinglist
archive and did not find what i was looking for, maybe someone here can
help me.

First, i wonder if the ArffLoader is loading the complete Arfffile into
memory when you set the source file, or if it only loads one Instance
after another when you just use getNextInstance() and if the previous read
Instances are kept in memory or if they get unreferenced and are
collectable by the garbage collection.

Second, i think i encountered a bug in the Instance.stringValue(int
index)-method. If you are using this method on a missing nominal value you
don't get an error token like "?", how i expected there, but you get the
first of the possible values for this attribute specified in the header.
Sure you can use the isMissing()-method to check for missing values, but
it would imho be more sensible if the stringValue()-method would return
the String that stands for a missing value instead of a wrong value. Or is
that behaviour intended, and if it is, what is the reason for it?

If anybody could find the time to give me a short answer it would be
greatly appreciated.

Regards, Chris

--
Sometimes you have to become what you are, before you can be what you
always wanted to become

_______________________________________________
Wekalist mailing list
[hidden email]
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
Reply | Threaded
Open this post in threaded view
|

Re: Question about ArffLoader behaviour and possible bug in weka.core.Instance

Mark Hall-11
On 7/12/05, Christian Huber <[hidden email]> wrote:

> Hi there,
>
> sorry if this has been adresses earlier, but i searched the mailinglist
> archive and did not find what i was looking for, maybe someone here can
> help me.
>
> First, i wonder if the ArffLoader is loading the complete Arfffile into
> memory when you set the source file, or if it only loads one Instance
> after another when you just use getNextInstance() and if the previous read
> Instances are kept in memory or if they get unreferenced and are
> collectable by the garbage collection.
>

If you use the ArffLoader from the command line then it loads the data
incrementally and prints it to standard out. As for its behaviour
elsewhere when it is used programmatically, it depends on how it is
used. For example, in the KnowledgeFlow it will operate in either
batch or incremental mode depending on the type of outgoing connection
that is used.

Cheers,
Mark.

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