Slide 1

Slide 1 text

Integrating Scikit-learn ML Models with ML.NET Using ONNX Practical ML.NET User Group Friday Feb 18, 2022 - Online event-

Slide 2

Slide 2 text

>whoami Miodrag Cekikj Senior .NET Software Dev ML Researcher & Enthusiast Technical Trainer Macedonian .NET Community member 2 https://www.linkedin.com/in/miodragcekikj/ https://medium.com/@cekikjmiodrag https://www.researchgate.net/profile/Miodrag-Cekikj https://speakerdeck.com/mcekic https://github.com/mcekikj

Slide 3

Slide 3 text

Session Roadmap 3 1 3 5 6 4 2 Cover Story ONNX in the picture Integration Demo From Idea to Prototype Dataset Overview Key Takeaways

Slide 4

Slide 4 text

“ There is no single development, in either technology or management technique, which by itself promises even one order-of-magnitude improvement within a decade in productivity, in reliability, in simplicity. Fred Brooks 4 Article source: http://worrydream.com/refs/Brooks-NoSilverBullet.pdf

Slide 5

Slide 5 text

1. Cover Story Have you ever thought about… 5

Slide 6

Slide 6 text

Lead Scoring ▷ Shared sales and marketing methodology used to rank leads to describe their potential of sales readiness to the company. 6 Image source: https://clickdimensions.com/products/how-to-create-a-lead-scoring-strategy/

Slide 7

Slide 7 text

Lead Conversion Process Clients Converted into a paying customer Leads Businesses or people who can eventually turn into clients Hot Leads Highly interested in product/service 7

Slide 8

Slide 8 text

Why ML after all? ▷ Generating big amount of data ▷ Digital marketing ▷ Lead generation ▷ Sales ▷ Predetermined structured format ▷ Leveraging on the history of generated data 8

Slide 9

Slide 9 text

Why ML after all? ▷ Improving and boosting the process and rates of lead conversions ▷ Additional in-depth insights ○ ML model interpretability 9

Slide 10

Slide 10 text

2. From Idea to Prototype Let’s give it a try! 10

Slide 11

Slide 11 text

Automated Lead Generation Providing a complementary and an easy-peasy tool for making the lead generation process more performant and efficient… 11

Slide 12

Slide 12 text

12 CRM RDBM S FILE(S) API Data Understanding Data Cleaning Exploratory Data Analysis Data Preparation Marketing & Sales Teams (Data insights Report) Data Processing Data Sources ML Algorithms & Pipelines ML Models Evaluation ML Models Fine Tuning ML Model Building ML Model Summary (Features Interpretation) Team .xlsx .csv Internal System(s) External System(s) DB File API ML Statistics & Reporting System Client Environment/Ecosystem Newly Generated Data Production Environment Technical Stats & Audit Deploy ML Driven Component Connection Adapter Input Data for newly generated data (Marketing/Sales teams) Lead Score Lead Decision

Slide 13

Slide 13 text

3. ONNX in the picture Light at the end of the tunnel… 13

Slide 14

Slide 14 text

ONNX ▷ Open Neural Network Exchange (ONNX) is an open file format standard representing the machine learning models. ▷ Framework-agnostic standard - it is built as a solution for providing unique format interoperability. ▷ Official website: https://onnx.ai/ ▷ GitHub: https://github.com/onnx ▷ Tutorials: https://github.com/onnx/tutorials 14

Slide 15

Slide 15 text

ONNX Runtime ▷ ONNX Runtime is a cross-platform and high- performance engine providing a set of different APIs for working and integrating to different target environments. ▷ Official website: https://onnxruntime.ai/ ▷ GitHub: https://github.com/microsoft/onnxruntime ▷ Tutorials: https://onnxruntime.ai/docs/tutorials/ 15

Slide 16

Slide 16 text

Technology gap context 16 Image source: https://towardsdatascience.com/deploy-sci-kit-learn-models-in-net-core-applications-90e24e572f64 Article by: George Novack

Slide 17

Slide 17 text

4. Dataset Overview Data Driven Marketing 17

Slide 18

Slide 18 text

Dataset ▷ Lead Scoring Dataset available on Kaggle ○ https://www.kaggle.com/amritachatterjee09/lead-scoring-dataset ▷ Historical data retrieved by the marketing/sales teams for the company named X Education. ▷ Online learning platform, where many professionals/students can find interest and participate in one or multiple courses. ▷ Data is generated using different sources, like web pages, landing pages, forms, etc. 18

Slide 19

Slide 19 text

Dataset ▷ Prerequisites ○ Data Cleaning ○ Exploratory Data Analysis (EDA) ○ Data Preparation ▷ Supervised machine learning approach ○ Regression -> Lead Scoring scenario ○ Classification -> Lead Decision scenario 19

Slide 20

Slide 20 text

5. Integration Demo Let’s get rolling folks! 20

Slide 21

Slide 21 text

Demo prerequisites ▷ > conda --version 4.10.3 ▷ > jupyter notebook --version 6.0.3 ▷ > sklearn.__version__ 0.23.1 ▷ > python --version 3.8.3 ▷ > dotnet --version 6.0.100 ▷ > skl2onnx.__version__ 1.9.0 ▷ > onnxruntime.__version__ 1.8.1 21

Slide 22

Slide 22 text

6. Key Takeaways Widen you gaze 22

Slide 23

Slide 23 text

Wrap Up Addressing Discrepancy Tools & Frameworks gaps Framework agnostic ONNX models across the most popular ML frameworks Cross-platform runtime engine ONNX Runtime provides a set of different APIs targeting different environments 23

Slide 24

Slide 24 text

RESOURCES ◎ Code repository: https://github.com/mcekikj/practical-ml-net-onnx ◎ Article: https://towardsdatascience.com/integrating-scikit-learn-machine-learning-models-into-the-microsoft-net-7eaec29e8669 ◎ Presentation:https://speakerdeck.com/mcekic/integrating-scikit-learn-ml-models-with-mlnet-using-onnx

Slide 25

Slide 25 text

Thank you! ☺ Let`s discuss, let`s connect! 25

Slide 26

Slide 26 text

Credits ▷ This template is free to use under Creative Commons Attribution license. ▷ The images are free for use according the public license of Unsplash. 26