Quick start: Build and deploy a machine learning model in a Jupyter notebook
Quick start: Build and deploy a machine learning model in a Jupyter notebook You can create, train, and deploy machine learning models with Watson Machine Learning in a Jupyter notebook. Read about the Jupyter notebooks, then watch a video and take a tutorial that’s suitable for intermediate users and requires coding. Required services : Watson Studio : Watson Machine Learning Your basic workflow includes these tasks: 1. Open your sandbox project. Projects are where you can collaborate with others to work with data. 2. Add a notebook to the project. You can create a blank notebook or import a notebook from a file or GitHub repository. 3. Add code and run the notebook. 4. Review the model pipelines and save the desired pipeline as a model. 5. Deploy and test your model. Read about Jupyter notebooks A Jupyter notebook is a web-based environment for interactive computing. If you choose to build a machine learning model in a notebook, you should be comfortable with coding in a Jupyter notebook. You can run small pieces of code that process your data, and then immediately view the results of your computation. Using this tool, you can assemble, test, and run all of the building blocks you need to work with data, save the data to Watson Machine Learning, and deploy the model. [Read more about training models in notebooks](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/ml-samples-overview.html) [Learn about other ways to build models](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/data-science.html) Watch a video about creating a model in a Jupyter notebook ![Watch Video](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/lc-video.png) Watch this video to see how to train, deploy, and test a machine learning model in a Jupyter notebook. This video provides a visual method to learn the concepts and tasks in this documentation. Try a tutorial to create a model in a Jupyter notebook In this tutorial, you will complete these tasks: * [Task 1: Open a project.](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-notebook.html?context=cdpaas&locale=enstep01) * [Task 2: Add a notebook to your project.](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-notebook.html?context=cdpaas&locale=enstep02) * [Task 3: Set up the environment.](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-notebook.html?context=cdpaas&locale=enstep03) * [Task 4: Run the notebook:](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-notebook.html?context=cdpaas&locale=enstep04) * Build and train a model. * Save a pipeline as a model. * Deploy the model. * Test the deployed model. * [Task 5: View and test the deployed model in the deployment space.](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-notebook.html?context=cdpaas&locale=enstep05) * [(Optional) Clean up.](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-notebook.html?context=cdpaas&locale=enstep06) This tutorial will take approximately 30 minutes to complete. Sample data The sample data used in this tutorial is from data that is part of scikit-learn and will be used to train a model to recognize images of hand-written digits, from 0-9. Expand all sections * Tips for completing this tutorial ### Use the video picture-in-picture Tip: Start the video, then as you scroll through the tutorial, the video moves to picture-in-picture mode. Close the video table of contents for the best experience with picture-in-picture. You can use picture-in-picture mode so you can follow the video as you complete the tasks in this tutorial. Click the timestamps for each task to follow along.The following animated image shows how to use the video picture-in-picture and table of contents features: ![How to use picture-in-picture and chapters](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/pip-and-chapters.gif){: width="560px" height="315px" data-tearsheet="this"} ### Get help in the community If you need help with this tutorial, you can ask a question or find an answer in the [Cloud Pak for Data Community discussion forum](https://community.ibm.com/community/user/cloudpakfordata/communities/community-home/digestviewer?communitykey=c0c16ff2-10ef-4b50-ae4c-57d769937235){: new_window}. ### Set up your browser windows For the optimal experience completing this tutorial, open Cloud Pak for Data in one browser window, and keep this tutorial page open in another browser window to switch easily between the two applications. Consider arranging the two browser windows side-by-side to make it easier to follow along. ![Side-by-side tutorial and UI](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/tutorial-side-by-side.png){: width="560px" height="315px" data-tearsheet="this"} Tip: If you encounter a guided tour while completing this tutorial in the user interface, click Maybe later. [Back to the top](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-notebook.html?context=cdpaas&locale=envideo-preview) * Task 1: Open a project You need a project to store the data and the AutoAI experiment. You can use your sandbox project or create a project. 1. From the navigation menu ![Navigation menu](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/navigation-menu.svg){: iih}, choose Projects > View all projects 1. Open your sandbox project. If you want to use a new project: 1. Click New project. 1. Select Create an empty project. 1. Enter a name and optional description for the project. 1. Choose an existing [object storage service instance](https://dataplatform.cloud.ibm.com/docs/content/wsj/admin/storage-options.html){: new_window} or create a new one. 1. Click Create. 1. When the project opens, click the Manage tab and select the Services and integrations page. ![preview tutorial video](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/lc-video.png) To preview this task, watch the video beginning at 00:07. 1. On the IBM services tab, click Associate service. 1. Select your Watson Machine Learning instance. If you don't have a Watson Machine Learning service instance provisioned yet, follow these steps: 1. Click New service. 1. Select Watson Machine Learning. 1. Click Create. 1. Select the new service instance from the list. 1. Click Associate service. 1. If necessary, click Cancel to