Top Banner
@PurpleFrogAlex www.purplefrogsystems.com [email protected] PurpleFrogSystems.com PurpleFrogSystems.com/blog @PurpleFrogSys Introduction to Machine Learning Alex Whittles
32

Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

May 20, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

[email protected]

PurpleFrogSystems.com

PurpleFrogSystems.com/blog

@PurpleFrogSys

Introduction to Machine Learning

Alex Whittles

Page 2: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Alex Whittles

Business Intelligence ConsultancyData Modelling ETL SystemsData Warehousing Reporting SystemsOLAP Cubes Managed Service

• SQL Relay Committee SQLRelay.co.uk

• SQL Bits Committee SQLBits.com

• Birmingham SQL UG SQLMidlands.com

• Birmingham Azure UG AzureBirmingham.uk

• MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD

• Run BI Consultancy

Page 3: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Alex Whittles

Business Intelligence ConsultancyData Modelling ETL SystemsData Warehousing Reporting SystemsOLAP Cubes Managed Service

• SQL Relay Committee SQLRelay.co.uk

• SQL Bits Committee SQLBits.com

• Birmingham SQL UG SQLMidlands.com

• Birmingham Azure UG AzureBirmingham.uk

• MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD

• Run BI Consultancy

Page 4: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Agenda

What is Machine Learning?Real world scenariosML algorithmsTraining & TestingData PreparationDemoUsing the model

Page 5: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

What is Machine Learning?

Page 6: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Machine Learning in Today’s WorldRetail - Amazon

Page 7: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

• Credit Scoring

• Customer Segmentation

• Post Office Image Recognition

Machine Learning in Today’s World

Page 8: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Agenda

What is Machine Learning?Real world scenariosML algorithmsTraining & TestingData PreparationDemoUsing the model

Page 9: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Type Scenario Model

Unsupervised Clustering K-Means

Outlier detection K-Means

Supervised Predict Yes/No Two-class boosted decision treeTwo-class logistic regression

Predict Classification Multi-class logistic regressionSupport Vector MachineMulti-class neural net

Predict Value Linear Regression

Feature based detection / intelligence Neural Net

Selecting a Model(simplified!!!!)

Page 10: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

K-Means ClusteringUnsupervised

Credit: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-algorithm-choice

No training, just dive straight in!

Page 11: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Logistic RegressionSupervised

Credit: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-algorithm-choice

Build a model using training data, then use

Page 12: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Linear RegressionSupervised

Credit: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-algorithm-choice

Page 13: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Decision TreesSupervised

Credit: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-algorithm-choice

Page 14: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Neural NetworkSupervised

Credit: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-algorithm-choice

Page 15: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Page 16: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Neural Network --> Deep Learning (n layers)Supervised

Credit: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-algorithm-choice

Page 17: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Page 18: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Agenda

What is Machine Learning?Real world scenariosML algorithmsTraining & TestingData PreparationDemoUsing the model

Page 19: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Training & Testing

Page 20: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Training & TestingOver trained

Page 21: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Training & TestingGeneric model

Page 22: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Training & TestingGeneric model

Page 23: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Training & TestingGeneric model

Page 24: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Demo

Page 25: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

• Consume pre generated ML functionalityCognitive ServicesBots

• Getting started on custom models, Graphical InterfaceAzure ML Studio (browser)

• Code your own complex models, full on data scientist code monkeyML WorkbenchML Server

Using Azure MLWhat do you want to do?

Page 26: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

• Batch Execution• Process prediction asynchronously for bulk data

• Web Service API• Data Lake Analytics• Excel

• Request-Response• One prediction at a time

• Web Service API• Stream Analytics

I’ve got my model – now what?

Page 27: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

I’ve got my model – now what?Real Time Data – Stream Analytics

WITH sentiment AS ( SELECT text, sentiment(text) as result from [Input]

)

Select text, result.[Scored Labels] Into [output]From [sentiment]

https://docs.microsoft.com/en-us/azure/stream-analytics/stream-analytics-machine-learning-integration-tutorial

Page 28: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Machine Learning Summary

Training Data Testing Data

Train

Test / Score Publish Query / Consume

Model Selection

Data PreparationLive Data

Use itDoes it work?

Page 29: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

• Algorithms are generic, not Azure ML specific• Other tools

• SQL Server on Prem• ‘R’ in SQL Server 2016 ‘Machine Learning Services’• Python added in SQL Server 2017

• R Studio• Python• SAS• Analysis Services Data mining• ‘R’ in Data Lake• Amazon Machine Learning

Machine Learning without Azure ML?

Page 30: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Page 31: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

Page 32: Introduction to Machine Learning - Microsoft · • MSc in Business Intelligence, CEng, CITP, FBCS, FIOEE, MIET, MIOD • Run BI Consultancy

@PurpleFrogAlex www.purplefrogsystems.com

[email protected]

PurpleFrogSystems.com

PurpleFrogSystems.com/blog

@PurpleFrogSys

Introduction to Machine Learning

Questions?Bit.ly/frogml