After the data preperation on Azure Databricks, it is time to build a machine learning model to prediect customer chrun. In this lab, we'll use Azure Machine Learning Studio for training and modeling.
- Azure Machine Learning Studio
- How to understand data
- Understand traning algorithm
- Traing models and select the best model
Create a service from here Azure Portal #Create ML Studio for lab.
Reference following table to create the service
Name | Value |
---|---|
workspace Name | azlab### |
Subscription | yoursubscription |
Resource Group | azlab-###-rg |
Localtion | South Central US |
Storage Account | 'Create new' , azhol###storage |
Workspace pricing tier | Standard |
Web service plan | 'create new', azlab###Plan |
Once you fill out the from, create by clicking button 'Create'
Open a new browser or tap and go to Azure ML Studio
Click on sign in, if you are already loged in on Azure Portal, it'll automatically
When you logged in to the service, please make sure your workspace name is correct or not
Click '+ NEW' and click 'Blank Experiment'
Click on the title of the experiment, and name it as azhol###
3.2.1. Get dataset url
In order to get the dataset url from your blob storage, you need to go to your blob storage account fomr Azure Portal
Open new tab (or browser) go to Azure Portal
Go to you blob by searching name of your blob which is similiar as 'blobdev'
In order to get save url to access to the dataset, you need to create a SAS url from the portal
Go to your blob storage account and go to container 'ingest'
Follow menu from the blob blade, Blob Service > Blobs > inget > azmlstudio
To generate SAS, click on the file 'part-00000-tid....csv', 'Generate SAS', 'Generate blob SAS token and URL' and then click on 'copy icon' at the bottom of the screen
Come back to Azure Machine Learning Studio
Search import from the left search box and drag and drop the import module to canvas
Click on the 'Import Data' module
Chage some options in the properties on the left panel
Name | Value |
---|---|
Data Source | Web URL via HTTP |
Data Source URL | paste url from the blob SAS generater |
Data format | csv |
CSV or TSV has header | Check |
Use cached resutls | Check |
Click 'Run' button in the bottom of the canvas, then it will download the dataset from blob to Azure ML Studio in a minute (around 10 sec)
When the running is done, you will see green check mark on your right coner of the canvas
Right click on the port of the module and click on 'Visualize'
From the visualize you can see summary informatio about the dataset
Search split Data from the left search box and drag and drop the import module to canvas
And drag bottom port of Import Data module drop to top port of Split Data module to link between thoes two module
Update split ratio in the properites
To trian the model we'll use:
- Two-Calss Logistic Regression
- Two-Class Boosted Decision Tree
And the label is 'Churn' since we are trying to build a machine learning to predict a customer churn