Product Recommender

Recommend content to your best customers


Beer Recommender Application

How it Works

Select a few beers you like and press “Go!” to send your preferences to a recommender algorithm. The algorithm will suggest beers that are similar in flavor and profile. The algorithm is written in R, a statistical language that can’t be “processed” by web applications because they are written in a different “type” of language.
In order to get the recommender algorithm to “live” in a web app, it is “hosted” on ScienceOps. The web app sends your beer preferences to ScienceOps, which passes back the algorithm’s beer predictions. All of this happens in less than a millisecond.

Application Integration with ScienceOps

  • A recommender model using cosine similarity matrices is deployed to ScienceOps
  • The model is integrated into a web application using the ScienceOps API
  • Users beer preferences are POST'ed to the model API which returns a list of recommended beers

The Integration

curl -X POST  --user username:1234567890abcdefg \
    --data '{"beers":["60 Minute IPA"]}' \
    https://sandbox.yhathq.com/demo/models/BeerRecommender/
45  class BeerRecommender(YhatModel):
46      @preprocess(in_type=dict, out_type=dict)
47      def execute(self, data):
48          beers = data.get("beers")
49          ...
22  getSimilarBeers <- function(beers_i_like) {
23     beers_i_like <- as.character(beers_i_like)
24     cols <- c("beer_name", beers_i_like)
25     best.beers <- dists[,cols]
26     ...
Checkout the rest of the code!
Contact
45 Main St #707,
Brooklyn, NY 11201
info@yhathq.com
+1 718 855 2107
+49 15735983455
Learn More
Connect With Us
Newsletter