Schema.org ranking vs rating - schema.org

I would like to use schema.org markup on my site. There are rating options/values to use but I need ranking. Only thing I can think to do is use rating of 10 stars = ranking of 1, rating of 9 stars = ranking of 2, etc. I was using search in google and was directed here to post question. If there is someone from google or familiar with schema.org values please comment. Best option would be to add ranking as a feature of schema.org. Thanks for the help.

There is no a ranking property in any of the schema items but rankings are just ordered lists, they specify the relationship of things between them in a list.
You can use https://schema.org/position to set each item position in an ordered list https://schema.org/ListItem simulating a ranking.

Related

Project Academic Knowlede | Query for and list papers by AA.AuId?

I've got a list of author names but I don't have Id's for any of them.
I'd like to:
Query by author name and store the most probable AuId.
List all papers written by a given AuId.
Is there any way to do this with the current interpret/evaluate APIs? It seems like everything is tied to a paper entity and I want to be sure I am only ever selecting and using one AuId.
Thanks.
I am not aware of such a feature. But indirectly, you could first search for the author name (AA.AuN in the expr-field), obtain all the (unique) various author IDs (AA.AuId in the attributes field), and search for their publications.
(You could even add orderby=logprob:desc, but to be honest, I am not 100% sure what logprob does.)
So, the first step could be to search for the author name (e.g. John Smith) like this and fetch all those AA.AuId where the names (AA.AuN) seem to fit John Smith (let's just add the orderby=logprob:desc):
https://api.labs.cognitive.microsoft.com/academic/v1.0/evaluate?&expr=Composite(AA.AuN=%27john%20smith%27)&count=100&attributes=AA.AuN,AA.AuId&orderby=logprob:desc&subscription-key={YOUR-KEY}
As a second step, if you have an Author ID AA.AuId (here, for example, 3038752200), use this to list their papers (ordered by year, in a descending manner orderby=Y:desc):
https://api.labs.cognitive.microsoft.com/academic/v1.0/evaluate?&expr=Composite(AA.AuId=3038752200)&count=100&attributes=AA.AuN,AA.AuId,DOI,Ti,VFN,Y&orderby=Y:desc&subscription-key={YOUR-KEY}
The approach would be more promising if you had an institutional affiliation as well. Then you could change the expr field to Composite(And(AA.AuN='{AUTHOR-NAME}',AA.AfId={AFFILIATION-ID})) so as to search for all {AUTHOR-NAMES} affiliated to {AFFILIATION-ID}.

Schema Ratings/Review Count

I am implementing schema ratings and reviews on the same page. Users can add a star rating or add a review with a star rating. When this happens I combining the two and outputtng the ratingvalue.
I can get them both working using the google data testing tool with reviewCount or ratingCount. Though I am wondering which is better to use, the reviewCount or ratingCount, or it doesn't matter?
Cheers
Both are different.
reviewCount: The count of total number of reviews.
ratingCount: The count of total number of ratings.
Please refer here for further details
ratingCount: The total number of ratings for the item on your site. At least one of ratingCount or reviewCount is required.
reviewCount: Specifies the number of people who provided a review with or without an accompanying rating. At least one of ratingCount or reviewCount is required.
Source: https://developers.google.com/search/docs/data-types/reviews

Mahout: Recommending Items for a user in particular product category

What do we have as of now? - We are using Mahout's GenericItemBasedRecommender to get a list of recommended products for a user using TanimotoCoefficientSimilarity as ItemSimilarity.
Where do we want to go from here? - The above works fine when we don't care about product category but what we want to know is the Product Category specific recommendations i.e. Say if a user has been buying, browsing, liking etc. specifically more in Men's and Gadgets category, I would then want to show this user recommendation in that specific category saying Recommended for you in [X] where X would be replaced by Mens or Gadgets in this case. We are thinking about a couple of options below to achieve this and we need some leads/opinion/feedback etc. so as to make sure we are going in the right direction. Options:
Firstly we'll have to move to a non-tanimoto version for calculating item similarity so that we account for users buying, liking, etc and not only view/browsing data.
Figuring out product category for a particular user (this is where we need direction) - Our product category hierarchy is basically a tree and we need to know which top 4 nodes (with best recommendations) in tree we would show to the user. Also if we are saying that node X is a category which we are showing to the user and node Y is a parent of node X we then don't want show user products in category Y or any parent for that matter. Couple of ways achieving this:
For every user calculate SUM of similarity scores values of items for a nodes at leaf level and recursively calculate for parent node till the root. Now at each node we have A = SUM of similarity scores & B = Number of Items Recommended so we also have A/B=Value (V) at each node. Now we pick the top 4 V values from the tree and recommend that to the user. The challenge here is that if we try to calculate this online during the request it we would tough to limit this under 150 ms for the entire request. An Example:
Root Level - Category12 (A=11, B=4) (category1 + category2)
|
_____________________|_________________________
/ \
/ \
Leaf Level - category1 (A=6, B=2) category2 (A=5, B=2)
Recommended products in Category 1: Item1 (score = 2), Item2 (score = 4)
Recommended products in Category 2: Item3 (score = 1), Item4 (score = 4)
Second option: For every category create a cluster of users based on their behaviour (likes, buying, viewing etc.) and then figure out the top 4 categories to which the user belongs. Not sure if we can achieve this using clustering in Mahout but I think we can do this offline.
Please provide your feedback/suggestions/leads/thoughts.
Thanks in advance!
If you want to model more than one thing in your data, I would suggest to use the SVD recommender instead with the ALSWR factorizer set to implicit feedback. With that done you can have user,item,preference in your data and the preference value would be how strongly associated your user is to the item. You can play with the numbers, for example a purchase is a 20 and a view is just a 2. I'm just throwing numbers here, I wouldn't know what will work best for your data, because you can also model things proportionally, as in if a purchase is 30 times less likely to happen than a view, then a purchase should be 30 times stronger than a view.
Mahout provides a way to influence the recommendations through the IDRescorer. You implement your own logic here and decide how to affect the recommendations. For example, the IDRescorer would check if a recommendation candidate belongs to the same category and if it does, boost the score by X. There's an example here (link) from the Mahout in Action Book (which you should definitely read), showing a rescorer.
Hope this helps

Sphinx frequency ranking

I have read sphinx documentation and cant find an answer.
I have a sphinx index set up on 2 fields (title, description)
I would like ranking to be higher the more times a search term is present in one or both of the fields. For example: A search for "car"
Product A:
Title: Red car
Desc: good car
Product B:
Title: Green car
Desc: A really good car. The best car.
In the above example I would like product B to rank higher than A because "car" is present 2 times in its description. Currently they two items are ranked equally.
What settings do i need to adjust in Sphinx to get this to work?
Thanks for the help
The quick and simple way would be to use SPH_RANK_WORDCOUNT
But you could get better results by using a custom ranker
http://sphinxsearch.com/docs/current.html#expression-ranker
eg with word_count or maybe hit_count.

User based collaborative filtering issue

In the user based Collaborative Filtering, the picture shows the formula of how to predict the rating of an item. And the NSa is the nearest neighbor set of user a. j is the item to be predicted. rij means the rating of item j by the user i in the NSa. So, my question is,what if the user i has never voted the item j? How to handle the rij? Thanks!
The sum is really over all the users in NSa that have also rated j. That's the usual answer, to restrict it this way too. You could also use some dummy value here when it doesn't exist, like using the average rating of user i instead. I don't recommend this as it slows things down without adding information.