pnsilva
pnsilva

Reputation: 665

Multi feature recommender system representation

I'm looking to expand my recommender system to include other features (dimensions). So far, I'm tracking how a user rates some document, and using that to do the recommendations. I'm interested in adding more features, such as user location, age, gender, and so on. So far, a few mysql tables have been enough to handle this, but i fear it will quickly become messy as i add more features.

My question: how can i best represent and persist this kind of multi dimensional data? Python specific tips would be helpful.

Thank you

Upvotes: 1

Views: 388

Answers (2)

CyberPlayerOne
CyberPlayerOne

Reputation: 3180

I recommend using tensors, which is multidimensional arrays. You can use any data table or simply text files to store a tensor. Each line or row is a record / transaction with different features all listed.

Upvotes: 1

Amitash
Amitash

Reputation: 1029

An SQL database should work fine in your case. In fact, you can store all the training examples in just one database, each row representing a particular training set and each column representing a feature. You can add features by adding collumns as and when required. In a relational database, you might come across access errors when querying for your data for various inconsistency reasons. Try using a NoSQL database. I personally user MongoDB and Pymongo on python to store the training examples as dicts in JSON format. (Easier for web apps this way).

Upvotes: 0

Related Questions