Thanks, Michael. I will try that.
[mailto:email@example.com] On Behalf Of Michael C. Harris
Sent: Tuesday, May 25, 2010 8:36 PM
Subject: Re: [Wekalist] remove instances
On Tue, May 25, 2010 at 04:08:19PM -0400, Saunders, Stewart wrote:
I am looping the instances in a dataset. I wish
to remove some of the
instances based on a condition. The code would read:
If (condition) remove instance(i);
When I go to the filters for the unsupervised instances, I find
RemoveWithValues, RemoveRange, etc. But I don't find a simple Remove.
Am I overlooking some simple solution?
RemoveRange can take a range of instance indices, a comma-separated list of instance
indices, or a mixture. So you can keep track of the instances you want to remove and
remove them with RemoveRange after the loop.
For example, RemoveRange -R 1,38,55-60 works.
Michael C. Harris, PhD candidate, School of CS&IT, RMIT University