AML and its use-cases
Agenda
 Machine Learning
 What is Machine Learning
 Types of Machine Learning
 Azure Machine Learning
 Licensing, Modules, Algorithms etc.,
 Building and operationalizing ML models
 Questions
What is Machine Learning
 Machine Learning is teaching computers to learn from past experiences.
Or
 It is the process of making better decisions by detecting the hidden patterns and
trends within the data.
Source : kdnuggets.com
Types of Machine Learning
 Supervised Learning
 Regression – predict a continuous or discreet value (Income Prediction, Stock
Prices)
 Classification – assign a category or class (Pattern recognition, Spam Filtering,
Facial Recognition, weather prediction)
 Unsupervised Learning
 Clustering – Grouping a set of objects such that objects in the same group
(cluster) are more similar to each other than to those in other groups
 Reinforcement Learning
 Feedback, games – relationship among variables
Types of Machine Learning with Usage
AML - Steps to get you started
 Head to free Azure Trial Subscription
 Valid for a month with $200 credit
 Need a live id or any Microsoft account
 Login to portal and create a sample ML Work Space
 Login to ML Studio to start building experiments
Life Cycle of Azure ML Experiments
Source Data
Transform or Cleanse Data
Split Data for Train and Test
Pick ML Algorithm
Train Model
Score Model
Evaluate Model
Building ML Predictive Models
 Define a business problem
 Source and cleanse the data
 Develop model (determine ML algorithm to use or BYO algo)
Demo – Build Model
 Predict Titanic Survivors
 Input parameters of Class, Gender, travelling with Siblings etc.,
 Supervised Learning – we know past survivors for training data
 Regression – Predicting a value
Building ML Predictive Models(cntd..)
 Deploy Model
 Finally consume in Applications using REST APIs in multiple
programming languages (R, python, C# etc.,)
Consuming AML web service
AML experiments provide a REST API which is consumed by web
applications, mobile applications, custom desktop applications
and even from within Excel.
• Provides code to call web service in R, C#, and Python
• can be consumed in two ways, either as :
– request-response service (RRS) - low latency, highly scalable where application
expect a response in real-time
– batch execution service (BES) – high volume, asynchronous scoring from sources
such as blobs, SQL azure, HDInsight where the scoring is done at scheduled
intervals.
Consuming AML web service(cntd..)
• The web services can be called with any programming
language and from any device that satisfies three criteria:
– Has a network connection
– Has SSL capabilities to perform HTTPS requests
– Has the ability to parse JSON (by hand or support libraries)
Demo – Building and operationalizing ML models
• Consuming the Predictive Model in Power BI
• Deploying the web service to Azure Template web app
• Log Mining
But…
• 2016 US Presidential Election results
– Nate Silver gave trump ~30% change for trump victory, NYT estimated at
~15%, Huffington Post at ~2% but still Trump won
– Root causes : non-representative voters sample, underestimated
republican vote in few states
• Uber surge Pricing – Sydney Lindt Café Incident
– Machine saw a spike in demand and increased price to meet demand. It
looked like it was cold profiteering from the tragedy.
– Root causes : It didn’t reason out why, may need human moderation for
extreme events
Conclusion - How to improve ML Results ?
• Understand the domain of data
• Be wary of overfitting and generalization in training data
– Overfitting - Justifying sample observations as possible by coming up with an overly
complex (and possibly incorrect) hypothesis.
• Be wary of outliers in the data sources
– Depending on the context, they either deserve special attention or should be completely
ignored
• Question the assumptions, examine data quality, beware of personal bias
• Repeat till satisfied
Azure ML Studio Components (Quick Recap)
 Datasets
 Data is sourced using data sets from a local file
 Experiments
 Modules can be dragged and dropped on the canvas
 Train, Score and Evaluate models are key modules
 Trained Models
 Once the model is finalized it can be saved for re-use in other experiments
 Web Services
 Create online or batch predictions using web service
 Sample code is shown for accessing end points using POST requests
Questions?
• Suggested readings:
https://www.coursera.org/course/ml
https://www.kaggle.com/
• AML Studio overview diagram : https://docs.microsoft.com/en-us/azure/machine-learning/machine-
learning-studio-overview-diagram
• AML Pricing details : https://azure.microsoft.com/en-au/pricing/details/machine-learning/
• Cortage Intelligence Gallery : https://docs.microsoft.com/en-us/azure/machine-learning/machine-
learning-gallery-how-to-use-contribute-publish
• Algorithms examples : https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-
basics-infographic-with-algorithm-examples
• Datasets
– http://www-eio.upc.edu/~pau/cms/rdata/datasets.html
– https://www.kaggle.com/c/titanic/data
References

Azure Machine Learning and its real-world use cases

  • 1.
    AML and itsuse-cases
  • 2.
    Agenda  Machine Learning What is Machine Learning  Types of Machine Learning  Azure Machine Learning  Licensing, Modules, Algorithms etc.,  Building and operationalizing ML models  Questions
  • 3.
    What is MachineLearning  Machine Learning is teaching computers to learn from past experiences. Or  It is the process of making better decisions by detecting the hidden patterns and trends within the data. Source : kdnuggets.com
  • 4.
    Types of MachineLearning  Supervised Learning  Regression – predict a continuous or discreet value (Income Prediction, Stock Prices)  Classification – assign a category or class (Pattern recognition, Spam Filtering, Facial Recognition, weather prediction)  Unsupervised Learning  Clustering – Grouping a set of objects such that objects in the same group (cluster) are more similar to each other than to those in other groups  Reinforcement Learning  Feedback, games – relationship among variables
  • 5.
    Types of MachineLearning with Usage
  • 7.
    AML - Stepsto get you started  Head to free Azure Trial Subscription  Valid for a month with $200 credit  Need a live id or any Microsoft account  Login to portal and create a sample ML Work Space  Login to ML Studio to start building experiments
  • 8.
    Life Cycle ofAzure ML Experiments Source Data Transform or Cleanse Data Split Data for Train and Test Pick ML Algorithm Train Model Score Model Evaluate Model
  • 9.
    Building ML PredictiveModels  Define a business problem  Source and cleanse the data  Develop model (determine ML algorithm to use or BYO algo)
  • 10.
    Demo – BuildModel  Predict Titanic Survivors  Input parameters of Class, Gender, travelling with Siblings etc.,  Supervised Learning – we know past survivors for training data  Regression – Predicting a value
  • 11.
    Building ML PredictiveModels(cntd..)  Deploy Model  Finally consume in Applications using REST APIs in multiple programming languages (R, python, C# etc.,)
  • 13.
    Consuming AML webservice AML experiments provide a REST API which is consumed by web applications, mobile applications, custom desktop applications and even from within Excel. • Provides code to call web service in R, C#, and Python • can be consumed in two ways, either as : – request-response service (RRS) - low latency, highly scalable where application expect a response in real-time – batch execution service (BES) – high volume, asynchronous scoring from sources such as blobs, SQL azure, HDInsight where the scoring is done at scheduled intervals.
  • 14.
    Consuming AML webservice(cntd..) • The web services can be called with any programming language and from any device that satisfies three criteria: – Has a network connection – Has SSL capabilities to perform HTTPS requests – Has the ability to parse JSON (by hand or support libraries)
  • 16.
    Demo – Buildingand operationalizing ML models • Consuming the Predictive Model in Power BI • Deploying the web service to Azure Template web app • Log Mining
  • 17.
    But… • 2016 USPresidential Election results – Nate Silver gave trump ~30% change for trump victory, NYT estimated at ~15%, Huffington Post at ~2% but still Trump won – Root causes : non-representative voters sample, underestimated republican vote in few states • Uber surge Pricing – Sydney Lindt Café Incident – Machine saw a spike in demand and increased price to meet demand. It looked like it was cold profiteering from the tragedy. – Root causes : It didn’t reason out why, may need human moderation for extreme events
  • 18.
    Conclusion - Howto improve ML Results ? • Understand the domain of data • Be wary of overfitting and generalization in training data – Overfitting - Justifying sample observations as possible by coming up with an overly complex (and possibly incorrect) hypothesis. • Be wary of outliers in the data sources – Depending on the context, they either deserve special attention or should be completely ignored • Question the assumptions, examine data quality, beware of personal bias • Repeat till satisfied
  • 19.
    Azure ML StudioComponents (Quick Recap)  Datasets  Data is sourced using data sets from a local file  Experiments  Modules can be dragged and dropped on the canvas  Train, Score and Evaluate models are key modules  Trained Models  Once the model is finalized it can be saved for re-use in other experiments  Web Services  Create online or batch predictions using web service  Sample code is shown for accessing end points using POST requests
  • 20.
  • 21.
    • AML Studiooverview diagram : https://docs.microsoft.com/en-us/azure/machine-learning/machine- learning-studio-overview-diagram • AML Pricing details : https://azure.microsoft.com/en-au/pricing/details/machine-learning/ • Cortage Intelligence Gallery : https://docs.microsoft.com/en-us/azure/machine-learning/machine- learning-gallery-how-to-use-contribute-publish • Algorithms examples : https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning- basics-infographic-with-algorithm-examples • Datasets – http://www-eio.upc.edu/~pau/cms/rdata/datasets.html – https://www.kaggle.com/c/titanic/data References