Getting Started With Azure Jupyter Notebook📋 With Azure ML Studio (Preview)

Azure Machine Learning services is one of the most-searched terms on the internet nowadays. Do you know why? It is because Azure ML studio (Preview) offers an interactive and visual workspace for Data Scientists, Analysts, and Developers to make ML workflow easier to build, test, and deploy a model.

Why Azure ML

  • It provides sophisticated pretrained models such as Cognitive Services.
  • Provides DevOps for Machine Learning
  • All Open-source frameworks like TensorFlow and Sci-kit learn, etc.. are available
  • Flexible deployment for on-premises and cloud
  • It provides us both drag-and-drop and coding workspace with clear documentation.
Open Azure portal here.

Before getting started, make sure you have an active Azure pass.
Step 1 - Create Azure ML resource

First of all, we need to create a workspace for our demo.

In Azure Home, click on Create a resource (plus icon) under the Azure Services.

Let us find Machine Learning service in the search box by typing Machine Learning or clicking on the AI + Machine Learning tap, located on the left side of your panel.

Next, Click on Create tap to create a new Machine Learning resource.
Azure ML Services🚀 with Azure Notebook📋 
Now,  give some credentials for creating an ML resource. Follow the instructions given below
  1. Enter your workspace name
  2. You can choose your active Azure pass subscription.
  3. Choose your existing Resource group; if you don’t have one, click on Create now.
  4. Choose your location as the server nearest to you.
  5. Workspace edition: Enterprise.
Click on Review + Create

 Azure ML Services🚀 with Azure Notebook📋

In the Review tab, you can verify all credentials that you have entered and click on the Create button.

 Azure ML Services🚀 with Azure Notebook📋

Once your deployment is completed, you will be redirected to the service overview window.

Here, we can open our deployed resource by clicking on Go to resource button.

Azure ML Services🚀 with Azure Notebook📋
Step 2 - Launch Azure ML studio

In our Machine Learning resource, there is an option for exploring Azure Machine Learning studio directly. That provides an interactive workspace and end-to-end machine learning lifecycle as well.

By default, you are in Overview pane, click on Launch now button (Highlighted right side) to launch the Azure ML studio.
Azure ML Services🚀 with Azure Notebook📋
Step 3 - Create Notebook

In the Azure Machine Learning Studio (preview) window, there are three different types of tools available, which provide better and more convenient handling for the author such as Data Scientist, Developers, and data analysts.

Click on Notebooks under the author to explore the Azure Notebook.

Azure ML Services🚀 with Azure Notebook📋

Here, we can see Azure ML gallery and User files. If you need some tutorial for Azure ML, click on samples under the Azure ML gallery.

Click on create folder >> folder name >> Select target directory >> Create

Azure ML Services🚀 with Azure Notebook📋

Now create a Python file for our ML experiment.
  • Click on the File icon.
  • Filename: your file name >> File type: Python Notebook >> Target directory: your directory
  • Click on the create button to make a Python notebook.
Step 4 - Create a Notebook VM

Before getting started at Notebook, we need a Virtual Machine for computing.
Here, the Azure Notebook virtual machine comes to full fill this task.
  • Click on +New VM to create a new Virtual Machine. 
Configure VM,
  • Notebook VM name: Enter your VM name
  • VM type: Choose your system type (as a beginner the STANDARD_DS1_V2 is sufficient)
Once you create a Notebook VM, you can see that in the Compute under the Manage panel.

Azure ML Services🚀 with Azure Notebook📋

Step 5 - Run Notebook

Now, it's time to check if our Notebook  is working fine or not.
  • Make sure your Notebook VM is on the running level.
  • Move the cursor in the middle of your Notebook you will see the Create text cell dialog and click on it.
  • By default, the cell is an empty markdown cell, choose Convert code cell for changing.
Now, we are ready to enter the coding part, write Python “Hello World” program to check if the Notebook is working.
The run button is available at the top right side of the Notebook and each cell also.

Azure ML Services🚀 with Azure Notebook📋
Step 6 - Upload Dataset

On the left side of your Notebook, you can see the vertical arrow, which helps us to upload the datasets.

Here, I will use the Iris dataset that is located in my local system.
  • Click on Upload files icon >> Navigate your dataset folder and choose file >> Open >> select target directory>> Upload.
Once it has uploaded, you can see the Dataset visually in your directory.
Azure ML Services🚀 with Azure Notebook📋
Step 7 - Understanding the dataset

Now read our uploaded dataset in the Notebook, that can be achieved effectively by executing the below commands.
  1. #Read Dataset  
  2. import pandas as pd  
  3. from pandas import read_csv  
  4. data = pd.read_csv("iris-data.csv")  
  5. print("Dataset read successfully")  
Here, I will give you the basic commands for understanding the Dataset quickly.

You can execute the below commands step by step with separate cells for getting good understandability.
  1. #Shape  
  2. print(data.shape)  
  3. #Species distribution  
  4. print(data.groupby('species').size())  
  5. #Head  
  6. print(data.head(20))  
  7. #Descriptions  
  8. print(data.describe())  
Azure ML Services🚀 with Azure Notebook📋
Step 8 - Data Visualization

Here, we are going to visualize our dataset through some famous Python libraries.

As I said, run at separate cells for better and more features.
  1. import seaborn as sns  
  2. import matplotlib.pyplot as plt  
  3. sns.boxplot(x='species',y='sepal_length',data=data)  
  5. sns.violinplot(x='species',y='sepal_width',data=data)  
  7. sns.pairplot(data,hue='species',kind='reg')  
  9. from pandas.plotting import radviz   
  10. radviz(data, "species")  
The above mentioned code will give you attractive univariate and multivariate plot visualization to make the dataset more meaningful.

 Azure ML Services🚀 with Azure Notebook📋


We have learned about,
  • How we create Azure ML Notebooks
  • Creating a Notebook VM
  • Uploading the datasets
  • Understanding the dataset
  • Data visualization.
I hope this article will help you if you feel any query, feel free to ask in the comment section.