Orange Forum • View topic - Adding attributes to data file in basket format

Adding attributes to data file in basket format

A place to ask questions about methods in Orange and how they are used and other general support.

Adding attributes to data file in basket format

Postby Guest » Sat Jun 28, 2008 23:20


I need to identify each transaction of an association rule.
Is it possible to add any attributes to a data file in basket format?
Since basket data is kept as meta attributes it should be possible, right?
May be non-meta attributes can be added to the domain later from another data file?

For this case since there is no id for each transaction in the basket file: is the order in the example strictly kept as in the file?

May be another option to identify each transaction would be to add a unique id to each transaction basket? I guess this wouldn't have any effect on the generation of association rules since each id is unique. So the ids will not have not enough support to appear in any rule but could be used later to identify the transaction of each rule via checking the related baskets.
Does this make sense?

Is there a more convenient way to identify each transactions of certain rules? May be an example script?

Thanks for any input on this,


Postby Janez » Sat Jul 12, 2008 23:41

Hi Elena,

tab-delimited files can have a column of type "basket" in which you list basket items. This way you can have examples with normal attributes and a number of basket-like meta attributes. See ... imited.htm for more on that.

The order of examples in the ExampleTable is strictly as in the file, too.

As for a convenient way to identify transactions belonging to a certain rule: that would be a good idea. I'll add it to the wish list. I'm sorry it isn't there already, it seems nobody thought of that yet.

Postby Janez » Wed Jul 23, 2008 21:11


association rules can now store the id's of transactions they cover (e.g. those that match the left side) and of transactions which confirm the rule (those matching both sides). The classes that only construct itemsets, can also provide the list of corresponding examples.

The ids are indices into the original list of transactions.

These functions are available in scripts (undocumented, yet) and also in widgets (also not documented, but it's trivial to use). The old widgets have been ported to Qt 4 with quite a few new functions added (they are also much faster than they used to be) and there are now also new widgets for induction and exploration of itemsets alone.

The inconvenient part is that all this is only implemented in the latest, Qt4-based version of Orange. It is not a major hassle to install all you need for running it, though. If you need any instructions, just ask.

Return to Questions & Support