{"id":937,"date":"2016-10-24T15:30:17","date_gmt":"2016-10-24T15:30:17","guid":{"rendered":"http:\/\/blog.stratio.com\/?p=937"},"modified":"2023-09-20T13:47:50","modified_gmt":"2023-09-20T13:47:50","slug":"creating-a-recommender-system-part-i","status":"publish","type":"post","link":"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/","title":{"rendered":"Creating a Recommender System (Part I)"},"content":{"rendered":"<p style=\"text-align: justify;\">This two-article series explains how to design and implement a hybrid recommender system that works just like the ones used by Amazon or Ebay.<\/p>\n<p><!--more--><\/p>\n<h2 style=\"text-align: justify;\">Introduction<\/h2>\n<p style=\"text-align: justify;\">Let\u2019s start with a short definition from Wikipedia:<\/p>\n<blockquote><p><em>Recommender systems or recommendation systems (sometimes replacing &#8220;system&#8221; with a synonym such as platform or engine) are a subclass of information filtering system that seek to predict the &#8216;rating&#8217; or &#8216;preference&#8217; that a user would give to an item.<\/em><\/p><\/blockquote>\n<p style=\"text-align: justify;\">The following diagram is a basic illustration:<\/p>\n<figure id=\"attachment_939\" aria-describedby=\"caption-attachment-939\" style=\"width: 848px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/blog.stratio.com\/wp-content\/uploads\/2016\/10\/Capture.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-939 size-full\" src=\"http:\/\/blog.stratio.com\/wp-content\/uploads\/2016\/10\/Capture.png\" alt=\"Recommender System diagram\" width=\"848\" height=\"360\" srcset=\"https:\/\/www.stratio.com\/blog\/wp-content\/uploads\/2016\/10\/Capture.png 848w, https:\/\/www.stratio.com\/blog\/wp-content\/uploads\/2016\/10\/Capture-300x127.png 300w, https:\/\/www.stratio.com\/blog\/wp-content\/uploads\/2016\/10\/Capture-768x326.png 768w\" sizes=\"(max-width: 848px) 100vw, 848px\" \/><\/a><figcaption id=\"caption-attachment-939\" class=\"wp-caption-text\">Recommender System diagram<\/figcaption><\/figure>\n<p style=\"text-align: justify;\">A recommender system analyses input data which contains information on different products and their user ratings. After reading and processing the data, the system \u00a0creates a model that can be used to predict ratings for a particular product or user.<\/p>\n<h2 style=\"text-align: justify;\">Approaches<\/h2>\n<p style=\"text-align: justify;\">In the recommender system world, there are three types of approaches to filter products:<\/p>\n<ol>\n<li style=\"text-align: justify;\"><strong>Collaborative filtering<\/strong>: this approach is based on collecting and analysing a large amount of information on users\u2019 behaviours, activities or preferences and predicting what they \u00a0like based on their similarity to other users.<\/li>\n<li style=\"text-align: justify;\"><strong>Content-based filtering<\/strong>: this approach is based on descriptions of user-preferences and items they have looked at or purchased in the past.<\/li>\n<li style=\"text-align: justify;\"><strong>Hybrid recommender systems<\/strong>: The hybrid approach combines collaborative filtering and content-based filtering.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">In this article, we will use all three approaches.<\/p>\n<h2>Architecture<\/h2>\n<p>We have selected the\u00a0<a href=\"http:\/\/blog.stratio.com\" target=\"_blank\" rel=\"noopener\">Stratio Platform<\/a>\u00a0as the base-solution because it eases the task of developing applications based on Spark and many other Big Data solutions.<\/p>\n<figure id=\"attachment_940\" aria-describedby=\"caption-attachment-940\" style=\"width: 665px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/blog.stratio.com\/wp-content\/uploads\/2016\/10\/Capture-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-940 size-full\" src=\"http:\/\/blog.stratio.com\/wp-content\/uploads\/2016\/10\/Capture-1.png\" alt=\"Architecture\" width=\"665\" height=\"416\" srcset=\"https:\/\/www.stratio.com\/blog\/wp-content\/uploads\/2016\/10\/Capture-1.png 665w, https:\/\/www.stratio.com\/blog\/wp-content\/uploads\/2016\/10\/Capture-1-300x188.png 300w, https:\/\/www.stratio.com\/blog\/wp-content\/uploads\/2016\/10\/Capture-1-400x250.png 400w\" sizes=\"(max-width: 665px) 100vw, 665px\" \/><\/a><figcaption id=\"caption-attachment-940\" class=\"wp-caption-text\">Architecture<\/figcaption><\/figure>\n<p>Our recommender system is divided into three main modules:<\/p>\n<ol>\n<li style=\"text-align: justify;\"><strong>Dataset Loader<\/strong>: this submodule will download the dataset from the Internet, process and store it in our two main data stores (<em>MongoDB<\/em>\u00a0and\u00a0<em>ElasticSearch<\/em>).<\/li>\n<li style=\"text-align: justify;\"><strong>Recommender Trainer<\/strong>: all the ratings stored in the DB by the previous module will be used to create a\u00a0<em>Collaborative Filtering<\/em>\u00a0model and pre-calculate recommendations for all users and products which will then in turn be stored in MongoDB.<\/li>\n<li style=\"text-align: justify;\"><strong>Recommender Server<\/strong>: using a small\u00a0<em>REST<\/em>\u00a0server we will send recommendation queries to\u00a0<em>MongoDB<\/em>\u00a0and\u00a0<em>ElasticSearch<\/em>.<\/li>\n<\/ol>\n<h2>Dependencies<\/h2>\n<p>This is the list of libraries used by this system:<\/p>\n<pre class=\"lang:default decode:true\">org.scala-lang:scala-library:2.10.6\n\nch.qos.logback:logback-classic:1.1.7\n\norg.apache.spark:spark-core_2.10:1.6.1\norg.apache.spark:spark-sql_2.10:1.6.1\norg.apache.spark:spark-mllib_2.10:1.6.1\n\norg.scalanlp:jblas:1.2.1\n\norg.mongodb:casbah-core_2.10:2.8.0\ncom.stratio.datasource:spark-mongodb_2.10:0.11.1\n\norg.elasticsearch:elasticsearch-hadoop:2.3.1\norg.elasticsearch:elasticsearch:2.3.1\n\ncom.github.scopt:scopt_2.10:3.4.0\n\ncommons-io:commons-io:2.5\norg.apache.commons:commons-compress:1.11\n\nio.spray:spray-json_2.10:1.3.2\nio.spray:spray-client_2.10:1.3.2\nio.spray:spray-routing_2.10:1.3.2\nio.spray:spray-can_2.10:1.3.2\nio.spray:spray-caching_2.10:1.3.2\n\ncom.typesafe.akka:akka-actor_2.10:2.3.9\n<\/pre>\n<h2>Dataset Loader<\/h2>\n<p style=\"text-align: justify;\">This submodule is responsible for downloading, reading, transforming and saving the dataset into our two data stores (<em>MongoDB<\/em>\u00a0and\u00a0<em>ElasticSearch<\/em>).<\/p>\n<p style=\"text-align: justify;\">Here is a brief description of the dataset:<\/p>\n<blockquote><p><em>This data set contains Amazon product reviews under six categories: camera, mobile phone, TV, laptop, tablet and video surveillance systems.<\/em><\/p>\n<p><em>Each product contains the attributes of: product ID (unique), name, product features, listing price and image URL.<\/em><\/p>\n<p><em>Each review contains the attributes of: review ID (unique), author, title, content, overall rating, date.<\/em><\/p><\/blockquote>\n<p>Once we have downloaded the dataset to the disk, we have to read the JSON files using Spark SQL which is a very simple task:<\/p>\n<pre class=\"lang:default decode:true \">val products = sqlContext.read.json(\"DATASET_DIR\/*\/*.json\")<\/pre>\n<p>It is then necessary to organise all the rows of our Product\/Review model:<\/p>\n<pre class=\"lang:default decode:true \">case class Product(productId: String, name: String, val price: String, features: String, imgUrl: String)\n\ncase class Review(reviewId: String, userId: String, productId: String, val title: String, overall: Option[Double], content: String, date: java.sql.Timestamp)\n\ndef mapPartitions(rows: Iterator[Row]): Iterator[(model.Product, Option[List[Review]])] = {\n  val df = new SimpleDateFormat(\"MMMM dd, yyyy\", Locale.US)\n\n  rows.flatMap { row =&gt;\n    if (row.fieldIndex(\"ProductInfo\") == -1 || row.getAs[Row](\"ProductInfo\").fieldIndex(\"ProductID\") == -1 || row.getAs[Row](\"ProductInfo\").getAs[String](\"ProductID\") == null) {\n      None\n    }\n    else {\n      val productRow = row.getAs[Row](\"ProductInfo\")\n      val product = new model.Product(productRow.getAs[String](\"ProductID\"), productRow.getAs[String](\"Name\"), productRow.getAs[String](\"Price\"), productRow.getAs[String](\"Features\"), productRow.getAs[String](\"ImgURL\"))\n\n      val reviews = row.fieldIndex(\"Reviews\") match {\n        case i if i &gt; -1 =&gt;\n          Option(row(i).asInstanceOf[mutable.WrappedArray[Row]].map { reviewRow =&gt;\n            val date: java.sql.Timestamp = reviewRow.getAs[String](\"Date\") match {\n              case s: String =&gt; new java.sql.Timestamp(df.parse(s).getTime)\n              case null =&gt; null\n            }\n            val overall: Option[Double] = reviewRow.getAs[String](\"Overall\") match {\n              case \"None\" =&gt; None\n              case s: String =&gt; Option(s.toDouble)\n            }\n            new Review(reviewRow.getAs[String](\"ReviewID\"), reviewRow.getAs[String](\"Author\"), product.productId, reviewRow.getAs[String](\"Title\"), overall, reviewRow.getAs[String](\"Content\"), date)\n          }.toList)\n        case -1 =&gt; None\n      }\n\n      Option((product, reviews))\n    }\n  }\n}\n\nval productReviewsRDD = products.mapPartitions(mapPartitions).cache()\n<\/pre>\n<p>And to save the Product\/Review tuples in the<em>\u00a0MongoDB<\/em>:<\/p>\n<pre class=\"lang:default decode:true \">val productConfig = ...\nval reviewsConfig = ...\n\nval mongoClient = ...\n\n\/\/Save the Products and Reviews using Stratio Spark-Mongodb connector\nproductReviewsRDD.map { case (product, reviews) =&gt; product }.toDF().distinct()\n                 .saveToMongodb(productConfig.build)\nproductReviewsRDD.flatMap { case (product, reviews) =&gt; reviews.getOrElse(List[Review]()) }.toDF().distinct()\n                 .saveToMongodb(reviewsConfig.build)\n<\/pre>\n<p>Finally, all the Products should be saved in\u00a0<em>ElasticSearch<\/em>:<\/p>\n<pre class=\"lang:default decode:true \">def storeDataInES(productReviewsRDD: RDD[model.Product])(implicit _conf: SparkConf, esConf: ESConfig): Unit = {\n  val options = Map(\"es.nodes\" -&gt; esConf.httpHosts, \"es.http.timeout\" -&gt; \"100m\", \"es.mapping.id\" -&gt; \"productId\")\n  val indexName = esConf.index\n  val typeName = \"%s\/%s\".format(indexName, PRODUCTS_INDEX_NAME)\n\n  val esClient = ...\n\n  \/\/Delete previous data\n  if(esClient.admin().indices().exists(new IndicesExistsRequest(indexName)).actionGet().isExists){\n    esClient.admin().indices().delete(new DeleteIndexRequest(indexName)).actionGet()\n  }\n\n  import org.elasticsearch.spark.sql._\n  import sqlContext.implicits._\n\n  \/\/Save the Products using Elasticsearch-Spark connector\n  productReviewsRDD.toDF().distinct().saveToEs(typeName, options)\n}\n\nstoreDataInES(productReviewsRDD.map { case (product, reviews) =&gt; product })\n<\/pre>\n<h2>Conclusions<\/h2>\n<p style=\"text-align: justify;\">The first part of this series gives an overview of what a recommender system is, what its main parts are and some basic algorithms which are frequently used in these kinds of systems. We have also implemented some functions using\u00a0<em>Spark SQL<\/em>\u00a0to read\u00a0<em>JSON files<\/em>\u00a0and to organise the data in\u00a0<em>MongoDB<\/em>\u00a0and\u00a0<em>ElasticSearch<\/em>\u00a0using<em>\u00a0Spark connectors<\/em>.<\/p>\n<p style=\"text-align: justify;\">We have not yet coded anything related to recommendation algorithms as this will be covered in the second part of the series along with:<\/p>\n<ul style=\"text-align: justify;\">\n<li>Generating our\u00a0<em>Collaborative Filtering<\/em>\u00a0model.<\/li>\n<li>Pre-calculating product \/ user recommendations.<\/li>\n<li>Launching a small\u00a0<em>REST<\/em>\u00a0server to interact with the recommender.<\/li>\n<li>Querying the data store to retrieve\u00a0<em>content-based recommendations<\/em>.<\/li>\n<li>Mixing the different types of recommendations to create a\u00a0<em>hybrid recommender<\/em>.<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">Coming soon.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This two-article series explains how to design and implement a hybrid recommender system that works just like the ones used by Amazon or Ebay.<\/p>\n","protected":false},"author":1,"featured_media":950,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[686],"tags":[],"ppma_author":[795],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.9 (Yoast SEO v22.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Creating a Recommender System (Part I)<\/title>\n<meta name=\"description\" content=\"Learn how to design and implement a hybrid recommender system that works just like the ones used by Amazon or Ebay, predicting the &#039;rating&#039; or &#039;preference&#039;.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Creating a Recommender System (Part I)\" \/>\n<meta property=\"og:description\" content=\"Learn how to design and implement a hybrid recommender system that works just like the ones used by Amazon or Ebay, predicting the &#039;rating&#039; or &#039;preference&#039;.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/\" \/>\n<meta property=\"og:site_name\" content=\"Stratio\" \/>\n<meta property=\"article:published_time\" content=\"2016-10-24T15:30:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-20T13:47:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.stratio.com\/blog\/wp-content\/uploads\/2016\/10\/Recomendation_system3.gif\" \/>\n\t<meta property=\"og:image:width\" content=\"730\" \/>\n\t<meta property=\"og:image:height\" content=\"312\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/gif\" \/>\n<meta name=\"author\" content=\"Stratio\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@stratiobd\" \/>\n<meta name=\"twitter:site\" content=\"@stratiobd\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Stratio\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/\"},\"author\":{\"name\":\"Stratio\",\"@id\":\"https:\/\/www.stratio.com\/blog\/#\/schema\/person\/d0377b199cd052b17e15c9ba44c45ab7\"},\"headline\":\"Creating a Recommender System (Part I)\",\"datePublished\":\"2016-10-24T15:30:17+00:00\",\"dateModified\":\"2023-09-20T13:47:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/\"},\"wordCount\":623,\"publisher\":{\"@id\":\"https:\/\/www.stratio.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.stratio.com\/blog\/wp-content\/uploads\/2016\/10\/Recomendation_system3.gif\",\"articleSection\":[\"Product\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/\",\"url\":\"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/\",\"name\":\"Creating a Recommender System (Part I)\",\"isPartOf\":{\"@id\":\"https:\/\/www.stratio.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.stratio.com\/blog\/wp-content\/uploads\/2016\/10\/Recomendation_system3.gif\",\"datePublished\":\"2016-10-24T15:30:17+00:00\",\"dateModified\":\"2023-09-20T13:47:50+00:00\",\"description\":\"Learn how to design and implement a hybrid recommender system that works just like the ones used by Amazon or Ebay, predicting the 'rating' or 'preference'.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/#primaryimage\",\"url\":\"https:\/\/www.stratio.com\/blog\/wp-content\/uploads\/2016\/10\/Recomendation_system3.gif\",\"contentUrl\":\"https:\/\/www.stratio.com\/blog\/wp-content\/uploads\/2016\/10\/Recomendation_system3.gif\",\"width\":730,\"height\":312,\"caption\":\"Recommdender System II\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.stratio.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Creating a Recommender System (Part I)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.stratio.com\/blog\/#website\",\"url\":\"https:\/\/www.stratio.com\/blog\/\",\"name\":\"Stratio Blog\",\"description\":\"Corporate blog\",\"publisher\":{\"@id\":\"https:\/\/www.stratio.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.stratio.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.stratio.com\/blog\/#organization\",\"name\":\"Stratio\",\"url\":\"https:\/\/www.stratio.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.stratio.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/stratio.com\/blog\/wp-content\/uploads\/2020\/06\/stratio-web-logo-1.png\",\"contentUrl\":\"https:\/\/stratio.com\/blog\/wp-content\/uploads\/2020\/06\/stratio-web-logo-1.png\",\"width\":260,\"height\":55,\"caption\":\"Stratio\"},\"image\":{\"@id\":\"https:\/\/www.stratio.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/stratiobd\",\"https:\/\/es.linkedin.com\/company\/stratiobd\",\"https:\/\/www.youtube.com\/c\/StratioBD\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.stratio.com\/blog\/#\/schema\/person\/d0377b199cd052b17e15c9ba44c45ab7\",\"name\":\"Stratio\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.stratio.com\/blog\/#\/schema\/person\/image\/bb38888f58c2bb664646155f78ae6ccc\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e3387ad00609f34a56d6796400eb8191?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e3387ad00609f34a56d6796400eb8191?s=96&d=mm&r=g\",\"caption\":\"Stratio\"},\"description\":\"Stratio guides businesses on their journey through complete #DigitalTransformation with #BigData and #AI. Stratio works worldwide for large companies and multinationals in the sectors of banking, insurance, healthcare, telco, retail, energy and media.\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Creating a Recommender System (Part I)","description":"Learn how to design and implement a hybrid recommender system that works just like the ones used by Amazon or Ebay, predicting the 'rating' or 'preference'.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/","og_locale":"en_US","og_type":"article","og_title":"Creating a Recommender System (Part I)","og_description":"Learn how to design and implement a hybrid recommender system that works just like the ones used by Amazon or Ebay, predicting the 'rating' or 'preference'.","og_url":"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/","og_site_name":"Stratio","article_published_time":"2016-10-24T15:30:17+00:00","article_modified_time":"2023-09-20T13:47:50+00:00","og_image":[{"width":730,"height":312,"url":"https:\/\/www.stratio.com\/blog\/wp-content\/uploads\/2016\/10\/Recomendation_system3.gif","type":"image\/gif"}],"author":"Stratio","twitter_card":"summary_large_image","twitter_creator":"@stratiobd","twitter_site":"@stratiobd","twitter_misc":{"Written by":"Stratio","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/#article","isPartOf":{"@id":"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/"},"author":{"name":"Stratio","@id":"https:\/\/www.stratio.com\/blog\/#\/schema\/person\/d0377b199cd052b17e15c9ba44c45ab7"},"headline":"Creating a Recommender System (Part I)","datePublished":"2016-10-24T15:30:17+00:00","dateModified":"2023-09-20T13:47:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/"},"wordCount":623,"publisher":{"@id":"https:\/\/www.stratio.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/#primaryimage"},"thumbnailUrl":"https:\/\/www.stratio.com\/blog\/wp-content\/uploads\/2016\/10\/Recomendation_system3.gif","articleSection":["Product"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/","url":"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/","name":"Creating a Recommender System (Part I)","isPartOf":{"@id":"https:\/\/www.stratio.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/#primaryimage"},"image":{"@id":"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/#primaryimage"},"thumbnailUrl":"https:\/\/www.stratio.com\/blog\/wp-content\/uploads\/2016\/10\/Recomendation_system3.gif","datePublished":"2016-10-24T15:30:17+00:00","dateModified":"2023-09-20T13:47:50+00:00","description":"Learn how to design and implement a hybrid recommender system that works just like the ones used by Amazon or Ebay, predicting the 'rating' or 'preference'.","breadcrumb":{"@id":"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/#primaryimage","url":"https:\/\/www.stratio.com\/blog\/wp-content\/uploads\/2016\/10\/Recomendation_system3.gif","contentUrl":"https:\/\/www.stratio.com\/blog\/wp-content\/uploads\/2016\/10\/Recomendation_system3.gif","width":730,"height":312,"caption":"Recommdender System II"},{"@type":"BreadcrumbList","@id":"https:\/\/www.stratio.com\/blog\/creating-a-recommender-system-part-i\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.stratio.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Creating a Recommender System (Part I)"}]},{"@type":"WebSite","@id":"https:\/\/www.stratio.com\/blog\/#website","url":"https:\/\/www.stratio.com\/blog\/","name":"Stratio Blog","description":"Corporate blog","publisher":{"@id":"https:\/\/www.stratio.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.stratio.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.stratio.com\/blog\/#organization","name":"Stratio","url":"https:\/\/www.stratio.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.stratio.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/stratio.com\/blog\/wp-content\/uploads\/2020\/06\/stratio-web-logo-1.png","contentUrl":"https:\/\/stratio.com\/blog\/wp-content\/uploads\/2020\/06\/stratio-web-logo-1.png","width":260,"height":55,"caption":"Stratio"},"image":{"@id":"https:\/\/www.stratio.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/stratiobd","https:\/\/es.linkedin.com\/company\/stratiobd","https:\/\/www.youtube.com\/c\/StratioBD"]},{"@type":"Person","@id":"https:\/\/www.stratio.com\/blog\/#\/schema\/person\/d0377b199cd052b17e15c9ba44c45ab7","name":"Stratio","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.stratio.com\/blog\/#\/schema\/person\/image\/bb38888f58c2bb664646155f78ae6ccc","url":"https:\/\/secure.gravatar.com\/avatar\/e3387ad00609f34a56d6796400eb8191?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e3387ad00609f34a56d6796400eb8191?s=96&d=mm&r=g","caption":"Stratio"},"description":"Stratio guides businesses on their journey through complete #DigitalTransformation with #BigData and #AI. Stratio works worldwide for large companies and multinationals in the sectors of banking, insurance, healthcare, telco, retail, energy and media."}]}},"authors":[{"term_id":795,"user_id":1,"is_guest":0,"slug":"stratioadmin","display_name":"Stratio","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/e3387ad00609f34a56d6796400eb8191?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.stratio.com\/blog\/wp-json\/wp\/v2\/posts\/937"}],"collection":[{"href":"https:\/\/www.stratio.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stratio.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stratio.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stratio.com\/blog\/wp-json\/wp\/v2\/comments?post=937"}],"version-history":[{"count":9,"href":"https:\/\/www.stratio.com\/blog\/wp-json\/wp\/v2\/posts\/937\/revisions"}],"predecessor-version":[{"id":13964,"href":"https:\/\/www.stratio.com\/blog\/wp-json\/wp\/v2\/posts\/937\/revisions\/13964"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.stratio.com\/blog\/wp-json\/wp\/v2\/media\/950"}],"wp:attachment":[{"href":"https:\/\/www.stratio.com\/blog\/wp-json\/wp\/v2\/media?parent=937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stratio.com\/blog\/wp-json\/wp\/v2\/categories?post=937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stratio.com\/blog\/wp-json\/wp\/v2\/tags?post=937"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.stratio.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}