Fork me on GitHub

MyMediaLite: Attribute files

News

MyMediaLite 3.11 has been released.


Attribute files

Binary attribute files have exactly two columns: the entity (user or item) ID and the attribute ID.

Examples

Tab-separated columns (.tsv)

51    5
51    22
51    26
51    29
51    35
51    36
51    45
This means that the entity 51 (may be a user or item) has the attributes 5, 22, 26, ... If this example is complete, it also means entity 51 does not have the attributes 0, 1, 2, 3, 4, 6, ...

Space-separated columns

51 5
51 22
51 26
51 29
51 35
51 36
51 45

Comma-separated columns (.csv)

51,5
51,22
51,26
51,29
51,35
51,36
51,45

Command-line tools

Both the item recommendation tool and the rating prediction tool support this file format: --user-attributes=FILE, --item-attributes=FILE

Classes

Reading

The class for reading in this kind of file is MyMediaLite.IO.AttributeData.

Writing

Writing this file format is trivial, so there is no specific class for that in MyMediaLite.

ContactFollow us on Twitter