All Projects → IBM → Product Recommendation With Watson Ml

IBM / Product Recommendation With Watson Ml

Licence: apache-2.0
Build a recommendation engine with Spark and Watson Machine Learning

Projects that are alternatives of or similar to Product Recommendation With Watson Ml

Teacher Student Training
This repository stores the files used for my summer internship's work on "teacher-student learning", an experimental method for training deep neural networks using a trained teacher model.
Stars: ✭ 34 (-2.86%)
Mutual labels:  jupyter-notebook
Satellite imagery analysis
Implementation of different techniques to find insights from the satellite data using Python.
Stars: ✭ 31 (-11.43%)
Mutual labels:  jupyter-notebook
Nlpnotebook
一份不断完善的NLP学习笔记
Stars: ✭ 35 (+0%)
Mutual labels:  jupyter-notebook
Pandas basics
basic pandas tutorials
Stars: ✭ 34 (-2.86%)
Mutual labels:  jupyter-notebook
Pyannote Core
Advanced data structures for handling temporal segments with attached labels.
Stars: ✭ 34 (-2.86%)
Mutual labels:  jupyter-notebook
Presentations
Stars: ✭ 35 (+0%)
Mutual labels:  jupyter-notebook
Learn Data Analysis W Python
Source code for 'Learn Data Analysis with Python; by A.J. Henley and Dave Wolf
Stars: ✭ 35 (+0%)
Mutual labels:  jupyter-notebook
Picanet
Stars: ✭ 35 (+0%)
Mutual labels:  jupyter-notebook
Misc
Machine Learning / Randomized Algorithm and more
Stars: ✭ 34 (-2.86%)
Mutual labels:  jupyter-notebook
Stratx
stratx is a library for A Stratification Approach to Partial Dependence for Codependent Variables
Stars: ✭ 35 (+0%)
Mutual labels:  jupyter-notebook
Cs231n
Convolutional Neural Networks for Visual Recognition (kNN, softmax, etc)
Stars: ✭ 34 (-2.86%)
Mutual labels:  jupyter-notebook
Kepler.gl
Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
Stars: ✭ 8,231 (+23417.14%)
Mutual labels:  jupyter-notebook
Mlwpy code
Code from the Pearson Addison-Wesley book Machine Learning with Python for Everyone
Stars: ✭ 34 (-2.86%)
Mutual labels:  jupyter-notebook
Ds502 Ai Engineer
DS502-AI工程师直通车课程项目,包含每一期课程学习和实践资料,同学们可以在issue中发布自己的疑问,互相交流。
Stars: ✭ 34 (-2.86%)
Mutual labels:  jupyter-notebook
Drugs Recommendation Using Reviews
Analyzing the Drugs Descriptions, conditions, reviews and then recommending it using Deep Learning Models, for each Health Condition of a Patient.
Stars: ✭ 35 (+0%)
Mutual labels:  jupyter-notebook
Restaurant success model
A model that predicts if a restaurant is going to fail within the next 4 years.
Stars: ✭ 34 (-2.86%)
Mutual labels:  jupyter-notebook
Healthcheck
Health Check ✔ is a Machine Learning Web Application made using Flask that can predict mainly three diseases i.e. Diabetes, Heart Disease, and Cancer.
Stars: ✭ 35 (+0%)
Mutual labels:  jupyter-notebook
Warp Pytorch
WARP loss for Pytorch as described by the paper: WSABIE: Scaling Up To Large Vocabulary Image Annotation
Stars: ✭ 35 (+0%)
Mutual labels:  jupyter-notebook
Chinese Stock Prediction Using Weibo Baidu News Sentiment
📈 A neural network regression model trained to predict the mean stock price percentage change everyday using financial factors like previous close price, actual previous close price, open price, market capitalization, total market value, price-to-earning ratio and price-to-book ratio, along with corresponding Sina Weibo and Baidu News sentiment scores.
Stars: ✭ 35 (+0%)
Mutual labels:  jupyter-notebook
Graph Isomorphism Networks
A Tensorflow 2.0 implementation of Graph Isomorphism Networks.
Stars: ✭ 35 (+0%)
Mutual labels:  jupyter-notebook

Build a product recommendation engine with Watson Machine Learning and PixieApps

In this code pattern historical shopping data is used to build a recommendation engine with Spark and Watson Machine Learning. The model is then used in an interactive PixieApp in which a shopping basket is simulated and used to create a list of recommendations.

When you have completed this code patterns, you will understand how to:

  • Use Jupyter Notebooks in IBM Watson Studio
  • Build a recommendation model with SparkML and Watson Machine Learning to provide product recommendations for customers based on their purchase history
  • Build an interactive dashboard using PixieApps

The intended audience is data scientists and developers interested in building, deploying and testing machine learning models from a Jupyter notebook with Watson Machine Learning.

Sample output

Here's an example of what the final app looks like

output

Flow

  1. Load the provided notebook into Watson Studio
  2. Load and transform the customer data in the notebook
  3. Build a k-means clustering model with SparkML
  4. Deploy the model to Watson Machine Learning
  5. Test and compare the models build in the notebook and through the Watson Machine Learning API
  6. Use the API to build an interactive PixieApp

Included Components

  • IBM Watson Studio: a suite of tools and a collaborative environment for data scientists, developers and domain experts
  • IBM Apache Spark: an open source cluster computing framework optimized for extremely fast and large scale data processing
  • IBM Watson Machine Learning: a set of REST APIs to develop applications that make smarter decisions, solve tough problems, and improve user outcomes
  • Jupyter Notebooks: an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and explanatory text
  • PixieDust: Python helper library for Jupyter notebooks
  • PixieApps: Python library to write and run UI elements for analytics directly in a Jupyter notebook

Steps

  1. Setup project and data in Watson Studio
  2. Create and deploy a recommendation engine with Watson Studio
  3. Run the recommendation PixieApp

1. Setup project and data in Watson Studio

To complete this code pattern we'll need to do a few setup steps before creating our model. In Watson Studio we need to: create a project, add our patient data (which our model will be based on), upload our notebook, and provision a Watson Machine Learning service.

1.1. Create a project in Watson Studio

  • Log into IBM's Watson Studio. Once in, you'll land on the dashboard.

  • Create a new project by clicking + New project and choosing Data Science:

    studio project

  • Enter a name for the project name and click Create.

NOTE: By creating a project in Watson Studio a free tier Object Storage service will be created in your IBM Cloud account. Select the Free storage type to avoid fees.

1.2 Provision a Watson Machine Learning service

  • Click on the navigation menu on the left () to show additional options. Click on the Watson Services option.

    add asset

  • From the overview page, click + Add service on the top right and choose the Machine Learning service. Select the Lite plan to avoid fees.

  • Once provisioned, you should see the service listed in the Watson Services overview page. Select the service by opening the link in a new tab. We're now in the IBM Cloud tool, where we will create service credentials for our now Watson Machine Learning service. Follow the numbered steps in the image below. We'll be using these credentials in Step 2, so keep them handy!.

    wml credentials

  • TIP: You can now go back the project via the navigation menu on the left ().

    add asset

1.3 Create a notebook in Watson Studio

The notebook we'll be using can be viewed in notebooks/wml-product-recommendation-engine.ipynb, and a completed version can be found in examples/wml-product-recommendation-engine-complete.ipynb.

2. Create and deploy a predictive model with Watson Studio

Now that we're in our Notebook editor, we can start to create our predictive model by stepping through the notebook.

2.1 Start stepping through the notebook

  • Click the ▶ Run button to start stepping through the notebook.

  • In cell 2. Load and explore data we call PixieDust's display() method to view the data interactively.

  • Keep stepping through the code, pausing on each step to read the code and see the output for the opertion we're performing. At the end of Step 3 we'll have used the K-means Clustering algorithm on Spark ML to create a model. This model associates every customer to a cluster based on their shopping history.

2.2 Save the model

The gist of the next two steps is to use the Watson Machine Learning Python client to persist and deploy the model we just created.

  • At the beginning of Step 5. Persist model, before we deploy our model, we need up update the cell with credentials from our Watson Machine Learning service. (Remember that from Step 1.2 Provision a Watson Machine Learning service?)

  • Update the wml_credentials variable below. Copy and paste the entire credential dictionary, which can be found on the Service Credentials tab of the Watson Machine Learning service instance created on the IBM Cloud.

    credentials-in-nb

  • Keep stepping through the code, pausing on each step to read the code and see the output for the opertion we're performing. At the end of Step 4 we'll have used the Watson Machine Learning service to persist and save our recommendation model! 🎉

2.3 Deploy the model

  • Now let's run Step 5. Deploy model to the IBM cloud of the notebook. Deploy our model so we can have an endpoint to score data against.

    score-url-in-nb

  • In Step 6. Create product recommendations we create functions that query the database to find the most popular items for a cluster and calculate the recommendations based on a given cluster. This produces a list of recommended items based on the products and quantities in a user's cart, which uses Watson Machine Learning to calculate the cluster based on the shopping cart contents.

  • Lastly, in Step 6.1 Test product recommendations model, these functions can now be used in a PixieApp to create an interactive dashboard.

Example Output

Here we add some products to our cart, and get some recommendations:

app

License

This code pattern is licensed under the Apache Software License, Version 2. Separate third party code objects invoked within this code pattern are licensed by their respective providers pursuant to their own separate licenses. Contributions are subject to the Developer Certificate of Origin, Version 1.1 (DCO) and the Apache Software License, Version 2.

Apache Software License (ASL) FAQ

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].