SSj
SSj

Reputation: 35

How can I convert probability into score?

I am now working on a document recommendation program and I am kinda stuck here. For each document, I have a score assigned according to user's actions. Then, when a new document comes in, I need to predict how user will like it and rerank the whole documents again according to their scores. My solution is to use a threshold to divide those scores into "recommend" and "not recommend". Then naiveBayes or other classification models can either give me a label or return the possibility of that label (I am using NLTK package to do text analytics). Am I on the right way? My question is when I get that possibility, how can I convert it into the score that I use to do the ranking? Or I should use logistic regression in scikit instead? Thanks!

Upvotes: 1

Views: 1434

Answers (2)

Davis King
Davis King

Reputation: 4791

I would suggest trying out something like the SVM-Rank algorithm. It takes as input a set of "recommended" and "not recommended" vectors and then learns how to rank them so that the recommended ones come first. There is also a simple python tool in dlib you can use to do it. See here for an example: http://dlib.net/svm_rank.py.html

Upvotes: 0

Raff.Edward
Raff.Edward

Reputation: 6534

It sounds like you are trying to force a ranking problem into a classification problem. What you really want to do is learn how to rank the documents given a "query".

Upvotes: 1

Related Questions