Saturday, March 13, 2010

A compressed vector space

Sometime is useful to represent a vector in a compressed form. This is particularly useful when you want to represent a vector of features in machine learning. The simplest data structure is an un-ordered vector of pairs (id, value), ... (id, value). The vector can be sorted on-the-fly for particular operations such as the intersection of two vectors. Here you have the code.

1 comment:

  1. Hello,

    Thank you for your tool. I'm a beginner of C++. Can you give me just a simple example of how program working for your data? I will appreaciate you.

    ReplyDelete