Yes, but in 0.5.1 (only waiting for PIO release) you can do that with one query:

    { "user": "u1",”item-set”:[“i1”, “i2”],"num”:2,"returnSelf":true}

This will do the score based ranking on the server in one query to the model. 
BTW you can have as many things in the item-set as you want.

In general you can combine scores and re-rank because they are all measuring 
the same type of thing in the same way, but beware of combining with any other 
types of scores that are not calculated in the same. For instance ensemble 
recommenders, which combine results for more than one recommender. More 
sophisticated combination schemes are required.


On Mar 1, 2017, at 12:06 PM, Masha Zaharchenko <[email protected]> wrote:

Yes, I want to use these scores to rank search results. And it`s unclear to me 
if I can compare scores returned by different queries(especially queries which 
use item id to get recommendations of similar items).

E.g. A user u1 had searched for keyword "cat" and two items were returned. 
Items ids are id1 and id2. 

We make two queries which look like this:
curl -H "Content-Type: application/json" -d '{ "user": 
"u1","item":"i1","num":1,"returnSelf":true}'  
http://localhost:8000/queries.json <http://localhost:8000/queries.json>
curl -H "Content-Type: application/json" -d '{ "user": 
"u1","item":"i2","num":1,"returnSelf":true}'  
http://localhost:8000/queries.json <http://localhost:8000/queries.json>

And we get two responses:
{"itemScores":[{"item":"i1","score":5}]}
{"itemScores":[{"item":"i2","score":4}]}

The question is: Can we use these scores(4 and 5) to rank the items?

On Wed, Mar 1, 2017 at 7:01 PM, Pat Ferrel <[email protected] 
<mailto:[email protected]>> wrote:
The scores are the sum of dot product between the user’s history vectors and 
the item’s indicator vectors, with norms and boosts applied for score 
calculation. Search this list for more discussion. The math means the more 
indicators or boosts the higher the possible value. These are exactly like the 
scores you get back from Searching with keywords. They have a precise 
mathematical meaning but are only used to rank results. they are returned in a 
form sorted by score.

Are you trying to use the scores?


On Feb 28, 2017, at 11:23 PM, Masha Zaharchenko <[email protected] 
<mailto:[email protected]>> wrote:

Hi, everyone!

I`m currently trying to use the UR to solve the ranking problem by getting 
scores for the each item on the list, but results are quite ambiguous and I`m 
not sure how to interpret them.
(I`m aware of the existence of Product Ranking Engine Template, but I`m curious 
if  I can do it with the UR)

Suppose I send the following queries:
A) $ curl -H "Content-Type: application/json" -d '{ "user": 
"5881C656F1284616BA5D47C42F930497","item":"242234","num":1,"returnSelf":true}'  
http://localhost:8000/queries.json <http://localhost:8000/queries.json>
Response: {"itemScores":[{"item":"242234","score":50.42802810668945}]}

B)$ curl -H "Content-Type: application/json" -d '{ "user": 
"5881C656F1284616BA5D47C42F930497","item":"83364","num":1,"returnSelf":true}'
Response: {"itemScores":[{"item":"83364","score":51.85137176513672}]}

Are these scores comparable or they only have a meaning within the limits of 
the query(i.e. recommending the given item as the most similar to itself)?

Thanks,
Maria



Reply via email to