.NET Fest 2019. Оля Гавриш. Машинное обучение для .NET программистов

N
Тема доклада
Тема доклада
Тема доклада
KYIV 2019
Machine Learning for .NET developers
.NET CONFERENCE #1 IN UKRAINE
Olia Gavrysh
Тема доклада
Тема доклада
Тема доклада
.NET LEVEL UP
About me
.NET CONFERENCE #1 IN UKRAINE KYIV 2019
Olia Gavrysh
Program Manager
Microsoft, .NET team
twitter: @oliagavrysh
Тема доклада
Тема доклада
Тема доклада
Let me learn something about you…
Make Machine Learning
When you start Machine Learning
without calculus
Тема доклада
Тема доклада
Тема доклада
.NET LEVEL UP
Agenda
.NET CONFERENCE #1 IN UKRAINE KYIV 2019
1. Machine Learning crash course
2. Building ML model with for your .NET app
with ML.NET
Machile Learning
crash course
KYIV 2019 .NET CONFERENCE #1 IN UKRAINE
© Microsoft Corporation
Examples
Predicts prices for the next month
Identify faces in images and videos
Detect fraud transactions
Classify if a customer is at retention risk
Some problems are difficult to solve using traditional algorithms and
procedural programming.
These examples are good candidates for machine learning.
© Microsoft Corporation
A repetitive
decision or process
Solution lacks an
explicit definition
A lot of historic
data
When can you use Machine Learning?
.NET LEVEL UP
Machine Learning
“Programming the UnProgrammable”
.NET CONFERENCE #1 IN UKRAINE KYIV 2019
rooms, bedrooms, bathrooms
location, view, near school
footage
year built
garage, basement, patio
…
{f(x) {f(x)
Types of Machine Learning
Many ML Tasks
Is this A or B? How much? How many? How is this organized?
Regression ClusteringClassification
And many more…
Types of Machine Learning
How ML works
ŷ = f(x)
Fcost = |y - ŷ| → 0
ŷ - our model
y – actual values (known answers)
Fcost - shows the difference between your
prediction and the actual values
Overfitting and Underfitting
.NET Fest 2019. Оля Гавриш. Машинное обучение для .NET программистов
.NET LEVEL UP
Creating ML Model
.NET CONFERENCE #1 IN UKRAINE KYIV 2019
Train Evaluate UseBuild
.NET LEVEL UP
Building Model
.NET CONFERENCE #1 IN UKRAINE KYIV 2019
Build
1. Upload Data
2. Prepare Data
3. Choose Algorithm
.NET LEVEL UP
Training Model
.NET CONFERENCE #1 IN UKRAINE KYIV 2019
Running the chosen
algorithm on the data.
Train
.NET LEVEL UP
Evaluating Model
.NET CONFERENCE #1 IN UKRAINE KYIV 2019
Calculate metrics that show how
good is the model using test data.
If not good – go back to Build phase.
Evaluate
All metrics: https://docs.microsoft.com/dotnet/machine-learning/resources/metrics
.NET LEVEL UP
Consuming Model
.NET CONFERENCE #1 IN UKRAINE KYIV 2019
Consume in your client
applications.
Use
Building a model with
KYIV 2019 .NET CONFERENCE #1 IN UKRAINE
© Microsoft Corporation
ML.NET
Machine Learning framework for building custom ML Models
Build for .NET developers
Proven at scale
Azure, Office, Windows
Extensible
TensorFlow, ONNX and Infer.NET
Cross-platform and open-source
Runs everywhere
Custom ML made easy with tools
CLI + UI-based tool for building models
In data science 80% of the time is spent
on preparing the data and 20% of the time
is spent on complaining about the need to
prepare the data.
© Microsoft Corporation
ML.NET Tooling
to help you with making decisions
AutoML
Model
Builder
© Microsoft Corporation
How much is the taxi fare for 1 passenger going from Boryspil to Kreschatyk?
© Microsoft Corporation
Criterion
Loss
Min Samples Split
Min Samples Leaf
XYZ
Parameter 1
Parameter 2
Parameter 3
Parameter 4
…
Distance
Trip time
Car type
Passengers
Time of day
…
Gradient Boosted
Nearest Neighbors
SGD
Bayesian Regression
LGBM
…
Distance Gradient Boosted
30%
Model
Car type
Passengers
Getting started with Machine Learning can be hard
ML.NET takes care of data prep, feature selection & hyperparameter tuning
Which algorithm? Which parameters?Which features?
© Microsoft Corporation
N Neighbors
Weights
Metric
P
ZYX
Which algorithm? Which parameters?Which features?
Distance
Trip time
Car type
Passengers
Time of day
…
Gradient Boosted
Nearest Neighbors
SGD
Bayesian Regression
LGBM
…
Nearest Neighbors
Criterion
Loss
Min Samples Split
Min Samples Leaf
XYZ
50%
Model
Iterate
30%
Gradient BoostedDistance
Car brand
Year of make
Car type
Passengers
Trip time
Getting started w/machine learning can be hard
ML.NET takes care of data prep, feature selection & hyperparameter tuning
© Microsoft Corporation
Which algorithm? Which parameters?Which features?
50%
30%
70%30%45%50%65%95%35%10%75%20%70%30%15%
Iterate
Getting started w/machine learning can be hard
A
ML.NET takes care of data prep, feature selection & hyperparameter tuning
© Microsoft Corporation
25%40%70%
25%
95%
25% 25%
25%
25%
40%
40%
40%
40%
70%
70%
70%Enter data
Define goals
Apply
constraints
Input Intelligently test multiple models in parallel
Optimized model
95%
ML.NET accelerates model development
© Microsoft Corporation
Demo
ML.NET
http://dot.net/ml
http://aka.ms/mlnetsamples
http://aka.ms/mlnetdocs
http://aka.ms/mlnet
Resources
Тема доклада
Тема доклада
Тема доклада
KYIV 2019
Thank you!
twitter: @oliagavrysh
.NET Fest 2019. Оля Гавриш. Машинное обучение для .NET программистов
Тема доклада
Тема доклада
Тема доклада
How long to train
*Dataset Size Dataset Type Avg. Time to train*
0 - 10 Mb Numeric and Text 10 sec
10 - 100 Mb Numeric and Text 10 min
100 - 500 Mb Numeric and Text 30 min
500 - 1 Gb Numeric and Text 60 min
1 Gb+ Numeric and Text 3 hour+
The exact time to train is a function of a few parameters like:
• The number of features or columns being used to predict
• The type of columns i.e. text vs. numeric
• The Type of machine learning task (e.g. regression vs. classification)
We have tested Model Builder with even 1TB dataset but building a high-quality model for
that size of dataset can take up to four days.
1. Supervised and not supervised
2. Types of ML problems (https://docs.microsoft.com/en-us/dotnet/machine-
learning/tutorials/index)
Pictures for diff problem types: https://docs.microsoft.com/en-us/dotnet/machine-
learning/automate-training-with-model-builder
1. Data prep https://docs.microsoft.com/en-us/dotnet/machine-learning/how-to-
guides/prepare-data-ml-net
2. Parameters, hyperparameter, labels
3. Training set evaluation set. Cross validation
4. Success metrics: accuracy, … https://github.com/dotnet/machinelearning-
samples/blob/master/modelbuilder/readme.md#evaluate
All metrics here: https://docs.microsoft.com/en-us/dotnet/machine-
learning/resources/metrics
5. How to improve results: more time, more/better data (the last – that’s where data
scientists are needed)
Price prediction step by step (one hot encoder, …): https://docs.microsoft.com/en-
us/dotnet/machine-learning/tutorials/predict-prices
Difference between machine learning and AI:
• If it’s written in Python, it’s probably machine learning
• If it’s written in PowerPoint, it’s probably AI
.NET Fest 2019. Оля Гавриш. Машинное обучение для .NET программистов
.NET Fest 2019. Оля Гавриш. Машинное обучение для .NET программистов
1 of 40

Recommended

.NET Fest 2018. Оля Гавриш. Машинное обучение для .NET разработчиков с помощь... by
.NET Fest 2018. Оля Гавриш. Машинное обучение для .NET разработчиков с помощь....NET Fest 2018. Оля Гавриш. Машинное обучение для .NET разработчиков с помощь...
.NET Fest 2018. Оля Гавриш. Машинное обучение для .NET разработчиков с помощь...NETFest
713 views40 slides
aymen cv by
aymen cvaymen cv
aymen cvaymoun22
90 views1 slide
Provenance in Production-Grade Machine Learning by
Provenance in Production-Grade Machine LearningProvenance in Production-Grade Machine Learning
Provenance in Production-Grade Machine LearningAnand Sampat
303 views53 slides
Windows 8 dev by
Windows 8 devWindows 8 dev
Windows 8 devChiheb Chebbi
318 views10 slides
EESP by
EESPEESP
EESPssuser529028
57 views15 slides
.NET Career Direction by
.NET Career Direction.NET Career Direction
.NET Career DirectionVolodymyr Voytyshyn
1.5K views16 slides

More Related Content

What's hot

March 2018 - Resume - Frances Coronel by
March 2018 - Resume - Frances CoronelMarch 2018 - Resume - Frances Coronel
March 2018 - Resume - Frances CoronelFrances Coronel
190 views1 slide
MWLUG 2014: Modern Domino (workshop) by
MWLUG 2014: Modern Domino (workshop)MWLUG 2014: Modern Domino (workshop)
MWLUG 2014: Modern Domino (workshop)Peter Presnell
1.9K views189 slides
Marvin AI: An Open Source Platform to Deploy and Manage Machine Learning Models by
Marvin AI: An Open Source Platform to Deploy and Manage Machine Learning ModelsMarvin AI: An Open Source Platform to Deploy and Manage Machine Learning Models
Marvin AI: An Open Source Platform to Deploy and Manage Machine Learning ModelsDaniel Takabayashi, MSc
259 views27 slides
AI school by
AI schoolAI school
AI schoolMeetupDataScienceRoma
154 views1 slide
Resume_Nihar by
Resume_NiharResume_Nihar
Resume_NiharNihar Ranjan Sarangi
309 views3 slides
Model Driven Applications Using Visual Studio Code Name Rosario by
Model Driven Applications Using Visual Studio Code Name RosarioModel Driven Applications Using Visual Studio Code Name Rosario
Model Driven Applications Using Visual Studio Code Name RosarioClint Edmonson
675 views28 slides

What's hot(8)

Similar to .NET Fest 2019. Оля Гавриш. Машинное обучение для .NET программистов

The A-Z of Data: Introduction to MLOps by
The A-Z of Data: Introduction to MLOpsThe A-Z of Data: Introduction to MLOps
The A-Z of Data: Introduction to MLOpsDataPhoenix
951 views52 slides
Leverage the power of machine learning on windows by
Leverage the power of machine learning on windowsLeverage the power of machine learning on windows
Leverage the power of machine learning on windowsMia Chang
53 views40 slides
Machine Learning for .NET Developers - ADC21 by
Machine Learning for .NET Developers - ADC21Machine Learning for .NET Developers - ADC21
Machine Learning for .NET Developers - ADC21Gülden Bilgütay
324 views20 slides
Machine Learning para devs com ML.NET by
Machine Learning para devs com ML.NETMachine Learning para devs com ML.NET
Machine Learning para devs com ML.NETLetticia Nicoli
213 views19 slides
Serverless Machine Learning by
Serverless Machine LearningServerless Machine Learning
Serverless Machine LearningAsavari Tayal
62 views21 slides
Info session 2021 by
Info session 2021Info session 2021
Info session 2021YousefAboElkhair
62 views25 slides

Similar to .NET Fest 2019. Оля Гавриш. Машинное обучение для .NET программистов(20)

The A-Z of Data: Introduction to MLOps by DataPhoenix
The A-Z of Data: Introduction to MLOpsThe A-Z of Data: Introduction to MLOps
The A-Z of Data: Introduction to MLOps
DataPhoenix951 views
Leverage the power of machine learning on windows by Mia Chang
Leverage the power of machine learning on windowsLeverage the power of machine learning on windows
Leverage the power of machine learning on windows
Mia Chang53 views
Machine Learning for .NET Developers - ADC21 by Gülden Bilgütay
Machine Learning for .NET Developers - ADC21Machine Learning for .NET Developers - ADC21
Machine Learning for .NET Developers - ADC21
Gülden Bilgütay324 views
Machine Learning para devs com ML.NET by Letticia Nicoli
Machine Learning para devs com ML.NETMachine Learning para devs com ML.NET
Machine Learning para devs com ML.NET
Letticia Nicoli213 views
Serverless Machine Learning by Asavari Tayal
Serverless Machine LearningServerless Machine Learning
Serverless Machine Learning
Asavari Tayal62 views
Lace presentation at world manufacturing forum 2014 wshop on learning gamific... by Fabrizio Cardinali
Lace presentation at world manufacturing forum 2014 wshop on learning gamific...Lace presentation at world manufacturing forum 2014 wshop on learning gamific...
Lace presentation at world manufacturing forum 2014 wshop on learning gamific...
Fabrizio Cardinali2.1K views
Top 10 IT training Institute in Delhi | Aptech Malviya Nagar by mcm academy
Top 10 IT training Institute in Delhi | Aptech Malviya NagarTop 10 IT training Institute in Delhi | Aptech Malviya Nagar
Top 10 IT training Institute in Delhi | Aptech Malviya Nagar
mcm academy153 views
Google Cloud Machine Learning by India Quotient
 Google Cloud Machine Learning  Google Cloud Machine Learning
Google Cloud Machine Learning
India Quotient7.6K views
NoOps in a Serverless World by Gary Arora
NoOps in a Serverless WorldNoOps in a Serverless World
NoOps in a Serverless World
Gary Arora308 views
Mohamed Taman short C.V version v1.0 by Mohamed Taman
Mohamed Taman short C.V version v1.0Mohamed Taman short C.V version v1.0
Mohamed Taman short C.V version v1.0
Mohamed Taman319 views
Experimentation to Industrialization: Implementing MLOps by Databricks
Experimentation to Industrialization: Implementing MLOpsExperimentation to Industrialization: Implementing MLOps
Experimentation to Industrialization: Implementing MLOps
Databricks350 views
Guide to end end machine learning projects by Skyl.ai
Guide to end end machine learning projectsGuide to end end machine learning projects
Guide to end end machine learning projects
Skyl.ai769 views
mca-5thSem-curriculum-and-Syllabus-2017-Batch.pdf by SanRock2
mca-5thSem-curriculum-and-Syllabus-2017-Batch.pdfmca-5thSem-curriculum-and-Syllabus-2017-Batch.pdf
mca-5thSem-curriculum-and-Syllabus-2017-Batch.pdf
SanRock225 views
MACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CD by IRJET Journal
MACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CDMACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CD
MACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CD
IRJET Journal4 views

More from NETFest

.NET Fest 2019. Николай Балакин. Микрооптимизации в мире .NET by
.NET Fest 2019. Николай Балакин. Микрооптимизации в мире .NET.NET Fest 2019. Николай Балакин. Микрооптимизации в мире .NET
.NET Fest 2019. Николай Балакин. Микрооптимизации в мире .NETNETFest
705 views74 slides
.NET Fest 2019. Сергей Калинец. Efficient Microservice Communication with .NE... by
.NET Fest 2019. Сергей Калинец. Efficient Microservice Communication with .NE....NET Fest 2019. Сергей Калинец. Efficient Microservice Communication with .NE...
.NET Fest 2019. Сергей Калинец. Efficient Microservice Communication with .NE...NETFest
341 views41 slides
.NET Fest 2019. Оля Гавриш. .NET Core 3.0 и будущее .NET by
.NET Fest 2019. Оля Гавриш. .NET Core 3.0 и будущее .NET.NET Fest 2019. Оля Гавриш. .NET Core 3.0 и будущее .NET
.NET Fest 2019. Оля Гавриш. .NET Core 3.0 и будущее .NETNETFest
617 views43 slides
.NET Fest 2019. Roberto Freato. Provisioning Azure PaaS fluently with Managem... by
.NET Fest 2019. Roberto Freato. Provisioning Azure PaaS fluently with Managem....NET Fest 2019. Roberto Freato. Provisioning Azure PaaS fluently with Managem...
.NET Fest 2019. Roberto Freato. Provisioning Azure PaaS fluently with Managem...NETFest
254 views7 slides
.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven Design by
.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven Design.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven Design
.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven DesignNETFest
1.5K views55 slides
.NET Fest 2019. Сергій Бута. Feature Toggles: Dynamic Configuration at Wirex by
.NET Fest 2019. Сергій Бута. Feature Toggles: Dynamic Configuration at Wirex.NET Fest 2019. Сергій Бута. Feature Toggles: Dynamic Configuration at Wirex
.NET Fest 2019. Сергій Бута. Feature Toggles: Dynamic Configuration at WirexNETFest
356 views35 slides

More from NETFest(20)

.NET Fest 2019. Николай Балакин. Микрооптимизации в мире .NET by NETFest
.NET Fest 2019. Николай Балакин. Микрооптимизации в мире .NET.NET Fest 2019. Николай Балакин. Микрооптимизации в мире .NET
.NET Fest 2019. Николай Балакин. Микрооптимизации в мире .NET
NETFest705 views
.NET Fest 2019. Сергей Калинец. Efficient Microservice Communication with .NE... by NETFest
.NET Fest 2019. Сергей Калинец. Efficient Microservice Communication with .NE....NET Fest 2019. Сергей Калинец. Efficient Microservice Communication with .NE...
.NET Fest 2019. Сергей Калинец. Efficient Microservice Communication with .NE...
NETFest341 views
.NET Fest 2019. Оля Гавриш. .NET Core 3.0 и будущее .NET by NETFest
.NET Fest 2019. Оля Гавриш. .NET Core 3.0 и будущее .NET.NET Fest 2019. Оля Гавриш. .NET Core 3.0 и будущее .NET
.NET Fest 2019. Оля Гавриш. .NET Core 3.0 и будущее .NET
NETFest617 views
.NET Fest 2019. Roberto Freato. Provisioning Azure PaaS fluently with Managem... by NETFest
.NET Fest 2019. Roberto Freato. Provisioning Azure PaaS fluently with Managem....NET Fest 2019. Roberto Freato. Provisioning Azure PaaS fluently with Managem...
.NET Fest 2019. Roberto Freato. Provisioning Azure PaaS fluently with Managem...
NETFest254 views
.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven Design by NETFest
.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven Design.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven Design
.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven Design
NETFest1.5K views
.NET Fest 2019. Сергій Бута. Feature Toggles: Dynamic Configuration at Wirex by NETFest
.NET Fest 2019. Сергій Бута. Feature Toggles: Dynamic Configuration at Wirex.NET Fest 2019. Сергій Бута. Feature Toggles: Dynamic Configuration at Wirex
.NET Fest 2019. Сергій Бута. Feature Toggles: Dynamic Configuration at Wirex
NETFest356 views
.NET Fest 2019. Michael Staib. Hot Chocolate: GraphQL Schema Stitching with A... by NETFest
.NET Fest 2019. Michael Staib. Hot Chocolate: GraphQL Schema Stitching with A....NET Fest 2019. Michael Staib. Hot Chocolate: GraphQL Schema Stitching with A...
.NET Fest 2019. Michael Staib. Hot Chocolate: GraphQL Schema Stitching with A...
NETFest1.6K views
.NET Fest 2019. Андрей Литвинов. Async lifetime tests with xUnit and AutoFixture by NETFest
.NET Fest 2019. Андрей Литвинов. Async lifetime tests with xUnit and AutoFixture.NET Fest 2019. Андрей Литвинов. Async lifetime tests with xUnit and AutoFixture
.NET Fest 2019. Андрей Литвинов. Async lifetime tests with xUnit and AutoFixture
NETFest326 views
.NET Fest 2019. Анатолий Колесник. Love, Death & F# Tests by NETFest
.NET Fest 2019. Анатолий Колесник. Love, Death & F# Tests.NET Fest 2019. Анатолий Колесник. Love, Death & F# Tests
.NET Fest 2019. Анатолий Колесник. Love, Death & F# Tests
NETFest224 views
.NET Fest 2019. Алексей Голуб. Монадные парсер-комбинаторы в C# (простой спос... by NETFest
.NET Fest 2019. Алексей Голуб. Монадные парсер-комбинаторы в C# (простой спос....NET Fest 2019. Алексей Голуб. Монадные парсер-комбинаторы в C# (простой спос...
.NET Fest 2019. Алексей Голуб. Монадные парсер-комбинаторы в C# (простой спос...
NETFest275 views
.NET Fest 2019. Roberto Freato. Azure App Service deep dive by NETFest
.NET Fest 2019. Roberto Freato. Azure App Service deep dive.NET Fest 2019. Roberto Freato. Azure App Service deep dive
.NET Fest 2019. Roberto Freato. Azure App Service deep dive
NETFest197 views
.NET Fest 2019. Леонид Молотиевский. DotNet Core in production by NETFest
.NET Fest 2019. Леонид Молотиевский. DotNet Core in production.NET Fest 2019. Леонид Молотиевский. DotNet Core in production
.NET Fest 2019. Леонид Молотиевский. DotNet Core in production
NETFest250 views
.NET Fest 2019. Александр Демчук. How to measure relationships within the Com... by NETFest
.NET Fest 2019. Александр Демчук. How to measure relationships within the Com....NET Fest 2019. Александр Демчук. How to measure relationships within the Com...
.NET Fest 2019. Александр Демчук. How to measure relationships within the Com...
NETFest204 views
.NET Fest 2019. Anna Melashkina та Philipp Bauknecht. Dragons in a Mixed Real... by NETFest
.NET Fest 2019. Anna Melashkina та Philipp Bauknecht. Dragons in a Mixed Real....NET Fest 2019. Anna Melashkina та Philipp Bauknecht. Dragons in a Mixed Real...
.NET Fest 2019. Anna Melashkina та Philipp Bauknecht. Dragons in a Mixed Real...
NETFest453 views
.NET Fest 2019. Alex Thissen. Architecting .NET solutions in a Docker ecosystem by NETFest
.NET Fest 2019. Alex Thissen. Architecting .NET solutions in a Docker ecosystem.NET Fest 2019. Alex Thissen. Architecting .NET solutions in a Docker ecosystem
.NET Fest 2019. Alex Thissen. Architecting .NET solutions in a Docker ecosystem
NETFest263 views
.NET Fest 2019. Stas Lebedenko. Practical serverless use cases in Azure with ... by NETFest
.NET Fest 2019. Stas Lebedenko. Practical serverless use cases in Azure with ....NET Fest 2019. Stas Lebedenko. Practical serverless use cases in Azure with ...
.NET Fest 2019. Stas Lebedenko. Practical serverless use cases in Azure with ...
NETFest170 views
.NET Fest 2019. Сергей Медведев. How serverless makes Integration TDD a reali... by NETFest
.NET Fest 2019. Сергей Медведев. How serverless makes Integration TDD a reali....NET Fest 2019. Сергей Медведев. How serverless makes Integration TDD a reali...
.NET Fest 2019. Сергей Медведев. How serverless makes Integration TDD a reali...
NETFest182 views
.NET Fest 2019. Сергей Корж. Natural Language Processing in .NET by NETFest
.NET Fest 2019. Сергей Корж. Natural Language Processing in .NET.NET Fest 2019. Сергей Корж. Natural Language Processing in .NET
.NET Fest 2019. Сергей Корж. Natural Language Processing in .NET
NETFest388 views
.NET Fest 2019. Eran Stiller. Create Your Own Serverless PKI with .NET & Azur... by NETFest
.NET Fest 2019. Eran Stiller. Create Your Own Serverless PKI with .NET & Azur....NET Fest 2019. Eran Stiller. Create Your Own Serverless PKI with .NET & Azur...
.NET Fest 2019. Eran Stiller. Create Your Own Serverless PKI with .NET & Azur...
NETFest243 views
.NET Fest 2019. Eran Stiller. 6 Lessons I Learned on My Journey from Monolith... by NETFest
.NET Fest 2019. Eran Stiller. 6 Lessons I Learned on My Journey from Monolith....NET Fest 2019. Eran Stiller. 6 Lessons I Learned on My Journey from Monolith...
.NET Fest 2019. Eran Stiller. 6 Lessons I Learned on My Journey from Monolith...
NETFest215 views

Recently uploaded

CWP_23995_2013_17_11_2023_FINAL_ORDER.pdf by
CWP_23995_2013_17_11_2023_FINAL_ORDER.pdfCWP_23995_2013_17_11_2023_FINAL_ORDER.pdf
CWP_23995_2013_17_11_2023_FINAL_ORDER.pdfSukhwinderSingh895865
536 views6 slides
Ch. 8 Political Party and Party System.pptx by
Ch. 8 Political Party and Party System.pptxCh. 8 Political Party and Party System.pptx
Ch. 8 Political Party and Party System.pptxRommel Regala
53 views11 slides
Google solution challenge..pptx by
Google solution challenge..pptxGoogle solution challenge..pptx
Google solution challenge..pptxChitreshGyanani1
135 views18 slides
Classification of crude drugs.pptx by
Classification of crude drugs.pptxClassification of crude drugs.pptx
Classification of crude drugs.pptxGayatriPatra14
92 views13 slides
Gopal Chakraborty Memorial Quiz 2.0 Prelims.pptx by
Gopal Chakraborty Memorial Quiz 2.0 Prelims.pptxGopal Chakraborty Memorial Quiz 2.0 Prelims.pptx
Gopal Chakraborty Memorial Quiz 2.0 Prelims.pptxDebapriya Chakraborty
684 views81 slides
Create a Structure in VBNet.pptx by
Create a Structure in VBNet.pptxCreate a Structure in VBNet.pptx
Create a Structure in VBNet.pptxBreach_P
75 views8 slides

Recently uploaded(20)

Ch. 8 Political Party and Party System.pptx by Rommel Regala
Ch. 8 Political Party and Party System.pptxCh. 8 Political Party and Party System.pptx
Ch. 8 Political Party and Party System.pptx
Rommel Regala53 views
Classification of crude drugs.pptx by GayatriPatra14
Classification of crude drugs.pptxClassification of crude drugs.pptx
Classification of crude drugs.pptx
GayatriPatra1492 views
Create a Structure in VBNet.pptx by Breach_P
Create a Structure in VBNet.pptxCreate a Structure in VBNet.pptx
Create a Structure in VBNet.pptx
Breach_P75 views
CUNY IT Picciano.pptx by apicciano
CUNY IT Picciano.pptxCUNY IT Picciano.pptx
CUNY IT Picciano.pptx
apicciano54 views
AI Tools for Business and Startups by Svetlin Nakov
AI Tools for Business and StartupsAI Tools for Business and Startups
AI Tools for Business and Startups
Svetlin Nakov111 views
The Accursed House by Émile Gaboriau by DivyaSheta
The Accursed House  by Émile GaboriauThe Accursed House  by Émile Gaboriau
The Accursed House by Émile Gaboriau
DivyaSheta212 views
When Sex Gets Complicated: Porn, Affairs, & Cybersex by Marlene Maheu
When Sex Gets Complicated: Porn, Affairs, & CybersexWhen Sex Gets Complicated: Porn, Affairs, & Cybersex
When Sex Gets Complicated: Porn, Affairs, & Cybersex
Marlene Maheu73 views
Sociology KS5 by WestHatch
Sociology KS5Sociology KS5
Sociology KS5
WestHatch76 views
ISO/IEC 27001 and ISO/IEC 27005: Managing AI Risks Effectively by PECB
ISO/IEC 27001 and ISO/IEC 27005: Managing AI Risks EffectivelyISO/IEC 27001 and ISO/IEC 27005: Managing AI Risks Effectively
ISO/IEC 27001 and ISO/IEC 27005: Managing AI Risks Effectively
PECB 598 views
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx by ISSIP
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptxEIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
ISSIP379 views

.NET Fest 2019. Оля Гавриш. Машинное обучение для .NET программистов

  • 1. Тема доклада Тема доклада Тема доклада KYIV 2019 Machine Learning for .NET developers .NET CONFERENCE #1 IN UKRAINE Olia Gavrysh
  • 2. Тема доклада Тема доклада Тема доклада .NET LEVEL UP About me .NET CONFERENCE #1 IN UKRAINE KYIV 2019 Olia Gavrysh Program Manager Microsoft, .NET team twitter: @oliagavrysh
  • 3. Тема доклада Тема доклада Тема доклада Let me learn something about you…
  • 5. When you start Machine Learning without calculus
  • 6. Тема доклада Тема доклада Тема доклада .NET LEVEL UP Agenda .NET CONFERENCE #1 IN UKRAINE KYIV 2019 1. Machine Learning crash course 2. Building ML model with for your .NET app with ML.NET
  • 7. Machile Learning crash course KYIV 2019 .NET CONFERENCE #1 IN UKRAINE
  • 8. © Microsoft Corporation Examples Predicts prices for the next month Identify faces in images and videos Detect fraud transactions Classify if a customer is at retention risk Some problems are difficult to solve using traditional algorithms and procedural programming. These examples are good candidates for machine learning.
  • 9. © Microsoft Corporation A repetitive decision or process Solution lacks an explicit definition A lot of historic data When can you use Machine Learning?
  • 10. .NET LEVEL UP Machine Learning “Programming the UnProgrammable” .NET CONFERENCE #1 IN UKRAINE KYIV 2019 rooms, bedrooms, bathrooms location, view, near school footage year built garage, basement, patio … {f(x) {f(x)
  • 11. Types of Machine Learning
  • 12. Many ML Tasks Is this A or B? How much? How many? How is this organized? Regression ClusteringClassification And many more…
  • 13. Types of Machine Learning
  • 14. How ML works ŷ = f(x) Fcost = |y - ŷ| → 0 ŷ - our model y – actual values (known answers) Fcost - shows the difference between your prediction and the actual values
  • 17. .NET LEVEL UP Creating ML Model .NET CONFERENCE #1 IN UKRAINE KYIV 2019 Train Evaluate UseBuild
  • 18. .NET LEVEL UP Building Model .NET CONFERENCE #1 IN UKRAINE KYIV 2019 Build 1. Upload Data 2. Prepare Data 3. Choose Algorithm
  • 19. .NET LEVEL UP Training Model .NET CONFERENCE #1 IN UKRAINE KYIV 2019 Running the chosen algorithm on the data. Train
  • 20. .NET LEVEL UP Evaluating Model .NET CONFERENCE #1 IN UKRAINE KYIV 2019 Calculate metrics that show how good is the model using test data. If not good – go back to Build phase. Evaluate All metrics: https://docs.microsoft.com/dotnet/machine-learning/resources/metrics
  • 21. .NET LEVEL UP Consuming Model .NET CONFERENCE #1 IN UKRAINE KYIV 2019 Consume in your client applications. Use
  • 22. Building a model with KYIV 2019 .NET CONFERENCE #1 IN UKRAINE
  • 23. © Microsoft Corporation ML.NET Machine Learning framework for building custom ML Models Build for .NET developers Proven at scale Azure, Office, Windows Extensible TensorFlow, ONNX and Infer.NET Cross-platform and open-source Runs everywhere Custom ML made easy with tools CLI + UI-based tool for building models
  • 24. In data science 80% of the time is spent on preparing the data and 20% of the time is spent on complaining about the need to prepare the data.
  • 25. © Microsoft Corporation ML.NET Tooling to help you with making decisions AutoML Model Builder
  • 26. © Microsoft Corporation How much is the taxi fare for 1 passenger going from Boryspil to Kreschatyk?
  • 27. © Microsoft Corporation Criterion Loss Min Samples Split Min Samples Leaf XYZ Parameter 1 Parameter 2 Parameter 3 Parameter 4 … Distance Trip time Car type Passengers Time of day … Gradient Boosted Nearest Neighbors SGD Bayesian Regression LGBM … Distance Gradient Boosted 30% Model Car type Passengers Getting started with Machine Learning can be hard ML.NET takes care of data prep, feature selection & hyperparameter tuning Which algorithm? Which parameters?Which features?
  • 28. © Microsoft Corporation N Neighbors Weights Metric P ZYX Which algorithm? Which parameters?Which features? Distance Trip time Car type Passengers Time of day … Gradient Boosted Nearest Neighbors SGD Bayesian Regression LGBM … Nearest Neighbors Criterion Loss Min Samples Split Min Samples Leaf XYZ 50% Model Iterate 30% Gradient BoostedDistance Car brand Year of make Car type Passengers Trip time Getting started w/machine learning can be hard ML.NET takes care of data prep, feature selection & hyperparameter tuning
  • 29. © Microsoft Corporation Which algorithm? Which parameters?Which features? 50% 30% 70%30%45%50%65%95%35%10%75%20%70%30%15% Iterate Getting started w/machine learning can be hard A ML.NET takes care of data prep, feature selection & hyperparameter tuning
  • 30. © Microsoft Corporation 25%40%70% 25% 95% 25% 25% 25% 25% 40% 40% 40% 40% 70% 70% 70%Enter data Define goals Apply constraints Input Intelligently test multiple models in parallel Optimized model 95% ML.NET accelerates model development
  • 33. Тема доклада Тема доклада Тема доклада KYIV 2019 Thank you! twitter: @oliagavrysh
  • 35. Тема доклада Тема доклада Тема доклада How long to train *Dataset Size Dataset Type Avg. Time to train* 0 - 10 Mb Numeric and Text 10 sec 10 - 100 Mb Numeric and Text 10 min 100 - 500 Mb Numeric and Text 30 min 500 - 1 Gb Numeric and Text 60 min 1 Gb+ Numeric and Text 3 hour+ The exact time to train is a function of a few parameters like: • The number of features or columns being used to predict • The type of columns i.e. text vs. numeric • The Type of machine learning task (e.g. regression vs. classification) We have tested Model Builder with even 1TB dataset but building a high-quality model for that size of dataset can take up to four days.
  • 36. 1. Supervised and not supervised 2. Types of ML problems (https://docs.microsoft.com/en-us/dotnet/machine- learning/tutorials/index) Pictures for diff problem types: https://docs.microsoft.com/en-us/dotnet/machine- learning/automate-training-with-model-builder 1. Data prep https://docs.microsoft.com/en-us/dotnet/machine-learning/how-to- guides/prepare-data-ml-net 2. Parameters, hyperparameter, labels 3. Training set evaluation set. Cross validation 4. Success metrics: accuracy, … https://github.com/dotnet/machinelearning- samples/blob/master/modelbuilder/readme.md#evaluate All metrics here: https://docs.microsoft.com/en-us/dotnet/machine- learning/resources/metrics 5. How to improve results: more time, more/better data (the last – that’s where data scientists are needed)
  • 37. Price prediction step by step (one hot encoder, …): https://docs.microsoft.com/en- us/dotnet/machine-learning/tutorials/predict-prices
  • 38. Difference between machine learning and AI: • If it’s written in Python, it’s probably machine learning • If it’s written in PowerPoint, it’s probably AI

Editor's Notes

  1. In our projects, we are often asked to solve very hard problems. Many of these problems are relatively easy for a human to solve, but are difficult to program a computer to do. Consider these examples… How do you write code that determines whether a Netflix customer will renew their subscription or not? How do you code an application that can differentiate objects in real time from a video feed? How do you determine whether parts in a manufacturing line are defective? How do you solve these problems when the only tool available for us is procedural code and traditional algorithms.?
  2. The 3 problems we just saw all have 3 common properties: One, they involve a repeated decision or evaluation process. Two, it is difficult or impossible to explicitly describe the solution. And three, you do have labeled data – or existing examples where you can describe the situation, and map it to the correct result. This is where ML can help! However you cannot use ML, if you do not have enough data – this is because you only get a model that is as good as the quality of your sampling data. Further, whenever you can use code to achieve your desired solution, there is no need to leverage ML as the computing resources needed can be very expensive.
  3. .NET is a great tech stack for building a wide variety of applications. There is ASP.NET for web development, Xamarin for mobile development and with ML.NET we are trying to make .NET great for Machine Learning.
  4. 25
  5. ML.NET provides tooling that makes it easy to use. In particular, 2 really valuable tools are: AutoML and Model Builder What is AutoML? It is an API that accelerates model development for you. A lot of developers do not have the experience required to build or train Machine Learning models. With AutoML, the process of finding the best algorithm, is automated! Model Builder on the other hand provides an easy to understand visual interface to build, train, and deploy custom machine learning models. Prior machine learning expertise is not required. It also supports AutoML Rememeber depending on your data, giving you the error of each of the models and you can then decide which model to use. Most people just use the model with the least error. And we will see it in action soon.
  6. The data scientist is definitely not happy with 30%. They try a second time with a different algorithm and this time they maybe score 50%.
  7. This guesswork of what features with what algorithm, goes on and on, until the data scientist finds one that performs the best with a score close to 100% as much as possible. Often one gets tired and just goes with whichever model is good enough.
  8. AutoML, however, replaces the data scientist’s repeated model selection effort. What this means, is that even without a data science background, you can now build a model, by just leveraging AutoML. All you need to do: is load you data define your goal (are you trying to classify objects into 2 categories or are you trying to predict a value based on past values?) and apply constraints for example (want performance of 70% and above)
  9. In addition to ML.NET accelerating the model development phase, it also provides you with model explainability. As you can see above, Model A’s sensitivity to different features is different from that of Model B. Trip distance was very important is model A while Trip time was most important in Model B. Model explainability is very important because today there are so many people who build models and at the end are not sure which pieces of information were weighted heavily over the others by the resulting model. BUT AutoML provides with both autoML and model explainability. Now let us see AutoML in action!
  10. In addition to ML.NET accelerating the model development phase, it also provides you with model explainability. As you can see above, Model A’s sensitivity to different features is different from that of Model B. Trip distance was very important is model A while Trip time was most important in Model B. Model explainability is very important because today there are so many people who build models and at the end are not sure which pieces of information were weighted heavily over the others by the resulting model. BUT AutoML provides with both autoML and model explainability. Now let us see AutoML in action!