Search code examples
javamachine-learningwekafeature-engineering

Can I have a vector attribute in WEKA?


I am new to WEKA/machine learning and I am trying to create a model in which a single feature is a vector of 8 integers (ranging from 0-11) containing information of past choices. For example, [0,1,8,4,4,2,2,6] would mean that 0 was chosen in the last iteration, 1 was chosen two iterations ago, etc. Each choice has an impact on the next in this case and the order is important.

I was wondering if it is possible to represent this in WEKA as a feature. I am currently representing them as individual features but this does not make the relation or order between the values obvious and I was wondering if there is a better way to do it. Any input is appreciated, thanks!


Solution

  • Weka's ARFF format does not offer an attribute type that would allow you to encapsulate an ordered vector. Attributes are basically independent columns and the relational attribute type does not enforce an ordering either.

    Your data sounds more like a time series. If that is the case, you could look a the time series support in Weka.

    If your data does not represent a time series, then you may have to fall back on feature engineering. You can use the AddExpression filter for creating new attributes based on values from other attributes (e.g., difference between two attributes).

    With the MultiFilter you can combine an arbitrary number of filters into a single one. Which you then can use in conjunction with the FilteredClassifier meta-classifier.