> Hello, I have a time series, from which through a mining process I extract some attributes, save them in a data set, and then analyze them with weka using classification algorithms, now I am going to include more attributes in that same set of data. data for another purpose, I would like to know within this total data set, how could I access a particular attribute, or some of them, and save them in another data set, to be able to analyze them as an independent time series?
In Weka, you typically apply filters to modify your dataset, either by
attributes/columns or instances/rows.
If you want to remove attributes, then you can use the
weka.filters.unsupervised.attribute.Remove filter. For removing
instances, you can use the
weka.filters.unsupervised.instance.RemoveRange filter.
The "subset" convenience method of the "Instances" Python class
applies the Remove/RemoveRange filters internally to generate the
requested subset:
https://fracpete.github.io/python-weka-wrapper3/weka.core.html?highlight=subset#weka.core.dataset.Instances.subset
Here are some examples of the "subset" method being applied:
https://github.com/fracpete/python-weka-wrapper3-examples/blob/32f24bc4f62079ee8265799250c8e7ec45271d98/src/wekaexamples/core/dataset.py#L94
Having said all that, you can always configure the FilteredClassifier
meta-classifier to work off the original dataset and simply apply the
appropriate filters to the data (like Remove). That way, you don't
have to regenerate intermediate datasets whenever the original dataset
changes, e.g., due to data being added.
Cheers, Peter
--
My Open Source Blog -
http://open.fracpete.org