Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

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

38 views

Published on

А Вы знали, что практически для каждого проекта можно применить машинное обучение? И теперь для этого не нужно изучать новый язык программирования (как Python или R) и осваивать численные методы. В этом докладе я расскажу об основах машинного обучения и о том, как легко начать использовать его в своих .NET проектах с помощью ML.NET и других решений от Microsoft.

Published in: Education
  • Be the first to comment

  • Be the first to like this

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

  1. 1. Тема доклада Тема доклада Тема доклада KYIV 2019 Machine Learning for .NET developers .NET CONFERENCE #1 IN UKRAINE Olia Gavrysh
  2. 2. Тема доклада Тема доклада Тема доклада .NET LEVEL UP About me .NET CONFERENCE #1 IN UKRAINE KYIV 2019 Olia Gavrysh Program Manager Microsoft, .NET team twitter: @oliagavrysh
  3. 3. Тема доклада Тема доклада Тема доклада Let me learn something about you…
  4. 4. Make Machine Learning
  5. 5. When you start Machine Learning without calculus
  6. 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. 7. Machile Learning crash course KYIV 2019 .NET CONFERENCE #1 IN UKRAINE
  8. 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. 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. 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. 11. Types of Machine Learning
  12. 12. Many ML Tasks Is this A or B? How much? How many? How is this organized? Regression ClusteringClassification And many more…
  13. 13. Types of Machine Learning
  14. 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
  15. 15. Overfitting and Underfitting
  16. 16. .NET LEVEL UP Creating ML Model .NET CONFERENCE #1 IN UKRAINE KYIV 2019 Train Evaluate UseBuild
  17. 17. .NET LEVEL UP Building Model .NET CONFERENCE #1 IN UKRAINE KYIV 2019 Build 1. Upload Data 2. Prepare Data 3. Choose Algorithm
  18. 18. .NET LEVEL UP Training Model .NET CONFERENCE #1 IN UKRAINE KYIV 2019 Running the chosen algorithm on the data. Train
  19. 19. .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
  20. 20. .NET LEVEL UP Consuming Model .NET CONFERENCE #1 IN UKRAINE KYIV 2019 Consume in your client applications. Use
  21. 21. Building a model with KYIV 2019 .NET CONFERENCE #1 IN UKRAINE
  22. 22. © 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
  23. 23. 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.
  24. 24. © Microsoft Corporation ML.NET Tooling to help you with making decisions AutoML Model Builder
  25. 25. © Microsoft Corporation How much is the taxi fare for 1 passenger going from Boryspil to Kreschatyk?
  26. 26. © 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?
  27. 27. © 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
  28. 28. © 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
  29. 29. © 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
  30. 30. © Microsoft Corporation Demo ML.NET
  31. 31. http://dot.net/ml http://aka.ms/mlnetsamples http://aka.ms/mlnetdocs http://aka.ms/mlnet Resources
  32. 32. Тема доклада Тема доклада Тема доклада KYIV 2019 Thank you! twitter: @oliagavrysh
  33. 33. Тема доклада Тема доклада Тема доклада 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.
  34. 34. 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)
  35. 35. Price prediction step by step (one hot encoder, …): https://docs.microsoft.com/en- us/dotnet/machine-learning/tutorials/predict-prices
  36. 36. 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

×