ARISA Learning Material MACHINE LEARNING ENGINEER
CB
Published · 53 slides · 0 views
1 / 1
Description
ARISA Learning Material MACHINE LEARNING ENGINEER - EQF 7 PLO: 1 - Deep Learning (EQF 7), 2 - AI Technologies (EQF 7), 3 MLOps (EQF ), 4 - Machine Learning (EQF 7) , 5 - Explainable AI (EQF 7), , 6 - AI Awareness (EQF 6), 7 - Soft Skills
Related Topics
Share
Embed code
Download this presentation From Below
"ARISA Learning Material MACHINE LEARNING ENGINEER" is the property of its rightful owner. Permission is granted to download and print the materials on this website for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Presentation Transcript
01
ARISA Learning MaterialMACHINE LEARNING ENGINEER - EQF 7 PLO: 1 - Deep Learning (EQF 7), 2 - AI Technologies (EQF 7), 3 – MLOps (EQF &), 4 - Machine Learning (EQF 7) , 5 - Explainable AI (EQF 7), , 6 - AI Awareness (EQF 6), 7 - Soft Skills (EQF 6), 11 – Generative AI (EQF 7), 12 - Big Data & Data Analytics (EQF 7), 14 – HPC and cloud services (EQF 7)Learning Unit (LU): Deep LearningTopic: Introduction to Deep Learning<br>
02
2 Copyright © 2024 by the Artificial Intelligence Skills Alliance
All learning materials (including Intellectual Property Rights) generated in the framework of the ARISA project are made freely available to the public under an open license Creative Commons Attribution–NonCommercial (CC BY-NC 4.0).
ARISA Learning Material 2024
This material is a draft version and is subject to change after review coordinated by the European Education and Culture Executive Agency (EACEA).
Authors: Warsaw School of Computer Science
Disclaimer: This learning material has been developed under the Erasmus+ project ARISA (Artificial Intelligence Skills Alliance) which aims to skill, upskill, and reskill individuals into high-demand software roles across the EU. This project has been funded with support from the European Commission. The material reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein.<br>
All learning materials (including Intellectual Property Rights) generated in the framework of the ARISA project are made freely available to the public under an open license Creative Commons Attribution–NonCommercial (CC BY-NC 4.0).
ARISA Learning Material 2024
This material is a draft version and is subject to change after review coordinated by the European Education and Culture Executive Agency (EACEA).
Authors: Warsaw School of Computer Science
Disclaimer: This learning material has been developed under the Erasmus+ project ARISA (Artificial Intelligence Skills Alliance) which aims to skill, upskill, and reskill individuals into high-demand software roles across the EU. This project has been funded with support from the European Commission. The material reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein.<br>
03
3 About ARISA The Artificial Intelligence Skills Alliance (ARISA) is a four-year transnational project funded under the EU’s Erasmus+ programme. It delivers a strategic approach to sectoral cooperation on the development of Artificial Intelligence (AI) skills in Europe.
ARISA fast-tracks the upskilling and reskilling of employees, job seekers, business leaders, and policymakers into AI-related professions to open Europe to new business opportunities.
ARISA regroups leading ICT representative bodies, education and training providers, qualification regulatory bodies, and a broad selection of stakeholders and social partners across the industry. ARISA Partners & Associated Partners I LinkedIn I Twitter<br>
ARISA fast-tracks the upskilling and reskilling of employees, job seekers, business leaders, and policymakers into AI-related professions to open Europe to new business opportunities.
ARISA regroups leading ICT representative bodies, education and training providers, qualification regulatory bodies, and a broad selection of stakeholders and social partners across the industry. ARISA Partners & Associated Partners I LinkedIn I Twitter<br>
04
4 You can ask questions throughout the whole lecture by raising hand
There are no wrong questions Organizational issues<br>
There are no wrong questions Organizational issues<br>
05
5 Assignment Project
(Computer Vision) projects will be in pairs
- pair up and write the pairs down in the file on Teams<br>
(Computer Vision) projects will be in pairs
- pair up and write the pairs down in the file on Teams<br>
06
6 Grading 51 - 60 points → 3
61 - 70 points → 3.5
71 - 80 points → 4
81 - 90 points → 4.5
91 - 100 points → 5<br>
61 - 70 points → 3.5
71 - 80 points → 4
81 - 90 points → 4.5
91 - 100 points → 5<br>
07
7 https://www.jaggaer.com/download/analyst-report/gartner-hype-cycle-for-artificial-intelligence-2024<br>
08
8 Motivation - human brain https://www.medicalnewstoday.com/articles/320289 https://www.freepik.com/premium-ai-image/glowing-orange-yellow-representation-human-brain-within-outline-head-against_157958916.htm<br>
09
9 Deep Learning (DL) Deep learning is a rapidly evolving subfield of machine learning. It involves training artificial neural networks with massive datasets to solve complex problems. https://www.phdata.io/blog/data-science-terms-you-should-know-the-difference-between-ai-ml-and-dl/<br>
10
healthcare
autonomous cars
translations
manufacturing (quality control)
bots
image enhancements (‘face beauty’, better resolution)
accounting (OCR - ang. optical character recognition)
→ we have invoices as photos and want to extract text from them to search over or edit AI applications<br>
autonomous cars
translations
manufacturing (quality control)
bots
image enhancements (‘face beauty’, better resolution)
accounting (OCR - ang. optical character recognition)
→ we have invoices as photos and want to extract text from them to search over or edit AI applications<br>
11
11 Github Copilot, Gemini These are the tools that help in writing code i.e. in Google Collaboratory.<br>
12
https://botpenguin.com/glossary/turing-test<br>
13
Image Credit: TrackingAI.org<br>
14
Challenges and Ethical Considerations Bias: DL models can inherit biases from training data, leading to unfair or discriminatory outcomes.
Transparency: Many DL models, especially deep learning, are often seen as "black boxes" making their decision-making processes hard to explain (Explainability).
Safety: Ensuring that DL systems operate safely, particularly in critical applications like healthcare and autonomous driving.
AI Governance and Regulation: Establishing ethical guidelines and regulatory frameworks to ensure the responsible development of DL.
Job Displacement: Automation may replace certain jobs, raising concerns about employment and workforce displacement. creative vs.
physical work? employees using AI will most probably replace employees not using AI<br>
Transparency: Many DL models, especially deep learning, are often seen as "black boxes" making their decision-making processes hard to explain (Explainability).
Safety: Ensuring that DL systems operate safely, particularly in critical applications like healthcare and autonomous driving.
AI Governance and Regulation: Establishing ethical guidelines and regulatory frameworks to ensure the responsible development of DL.
Job Displacement: Automation may replace certain jobs, raising concerns about employment and workforce displacement. creative vs.
physical work? employees using AI will most probably replace employees not using AI<br>
15
15 CRISP-DM https://medium.com/@shawn.chumbar/the-crisp-dm-process-a-comprehensive-guide-4d893aecb151<br>
16
16 Let’s be less abstract<br>
17
17 Is world linear? https://greenemath.com/College_Algebra/92/Increasing-Decreasing-Constant-IntervalsLesson.html<br>
18
18 Nonlinearities in practice https://apadala-90574.medium.com/determinants-of-housing-price-bdefc783cf6b<br>
19
19 Jin, Shichao & Guo, Qinghua & Li, Min & Yang, Qiuli & Xu, Kexin & Ju, Yuanzhen & Zhang, Jing & Xuan, Jing & Su, Yanjun & Xu, Qiang & Liu, Yu. (2020). Application of deep learning in ecological resource research: Theories, methods, and challenges. Science China Earth Science. 10.1007/s11430-019-9584-9. linear problems Timeline - AI is no new<br>
20
20 https://link.medium.com/fv3z50FDYY<br>
21
21 Multilayer perceptron (MLP)
Other terms:
Feed-forward layers
Dense layers *watch out: there is also an abbreviation NLP which stands for Natural Language Processing<br>
Other terms:
Feed-forward layers
Dense layers *watch out: there is also an abbreviation NLP which stands for Natural Language Processing<br>
22
22 The basic concepts on MLP was covered already at the Machine Learning course.
We will do a recap based on Tensorboard Playground. https://playground.tensorflow.org/<br>
We will do a recap based on Tensorboard Playground. https://playground.tensorflow.org/<br>
23
23<br>
24
24 Regression vs. classification It depends if there is a discrete number of classes within output (classification) or infinite number of possible outputs (regression)
In both cases, there are different cost functions and metrics<br>
In both cases, there are different cost functions and metrics<br>
25
25 2. Dataset Note: In Data Science practice we often start with the dataset
and then think what ML task we can solve.<br>
and then think what ML task we can solve.<br>
26
26 3. Setup Dataset splits (common train/val/test → 70/20/10 %)
Noise - the bigger, the more difficult task
Batch size - specifies how many data sample are
the input within one ‘package’ to the model<br>
Noise - the bigger, the more difficult task
Batch size - specifies how many data sample are
the input within one ‘package’ to the model<br>
27
27 4. Training details Learning rate - decides about the pace of training (key hyperparameter)
Activation function - introduces nonlinearity
Regularization - can mitigate overfitting, there are also other methods (less important hyperparameter)<br>
Activation function - introduces nonlinearity
Regularization - can mitigate overfitting, there are also other methods (less important hyperparameter)<br>
28
28 Network architecture No clear rule on the number of hidden layers and neurons in the layers
Not always extracting features is easy (especially in the case of images), that is why convolutional neural networks were introduced (will be covered later during the course)<br>
Not always extracting features is easy (especially in the case of images), that is why convolutional neural networks were introduced (will be covered later during the course)<br>
29
29 4. Monitoring of the training process<br>
30
30 Labs (7 min) Play in Tensorflow Playground https://playground.tensorflow.org/<br>
31
31 How long the training should last? Key parameter is patience https://www.kaggle.com/code/ryanholbrook/overfitting-and-underfitting/code<br>
32
32 Let’s code<br>
33
33 Sklearn Note: sklearn has no GPU support - only MLP layers are possible https://scikit-learn.org/1.5/modules/neural_networks_supervised.html<br>
34
34 Deep learning frameworks used mostly in non-Computer
Science communities
rather for straighforward solutions used mostly by professionals
allows more for custom solutions<br>
Science communities
rather for straighforward solutions used mostly by professionals
allows more for custom solutions<br>
35
35 Deep learning frameworks used mostly in non-Computer
Science communities
rather for straighforward solutions used mostly by professionals
allows more for custom solutions Pytorch Lighting combines two words<br>
Science communities
rather for straighforward solutions used mostly by professionals
allows more for custom solutions Pytorch Lighting combines two words<br>
36
36 Note: this is use case is only for educational purpose, normally we classify images using convolutional neural networks (CNNs) that will be covered later Pytorch
classification of flatten images with handwritten digits<br>
classification of flatten images with handwritten digits<br>
37
37 MNIST https://www.tensorflow.org/datasets/catalog/mnist Boroojerdi, Soha & Rudolph, George. (2022). Handwritten Multi-Digit Recognition With Machine Learning. 1-6.<br>
38
38 Import packages<br>
39
39 2. Define neural network<br>
40
40 3. Set the variables The other popular optimizers are: SGD and AdamW.<br>
41
41 4. Create data loaders<br>
42
42 5. Training loop<br>
43
43 6. Testing of the final model on test set<br>
44
44 What was missing in the code?<br>
45
45 Early stopping! What was missing in the code?<br>
46
46 What we have to do? Create a validation set Note that previously it was called train_dataset<br>
47
47 2. At the end of each training epoch, we do inference on validation set and collect metrics<br>
48
48 3. We check if there is an improvement in performance on validation set We load the best model weights to do later inference on test set<br>
49
49 Code to notebook:
https://colab.research.google.com/drive/1g2Tp5biJ8bE6zWNBPE9-gOXTOoH2eqCm?usp=sharing<br>
https://colab.research.google.com/drive/1g2Tp5biJ8bE6zWNBPE9-gOXTOoH2eqCm?usp=sharing<br>
50
50 Saving and loading the model weights We don’t save the whole model as an object. We save only weights.
That is why when we want to load the trained model, first we initiate the model architecture and then load weights.
Note the names of layers in the model have to match the ones in the saved dictionary. https://pytorch.org/tutorials/beginner/saving_loading_models.html<br>
That is why when we want to load the trained model, first we initiate the model architecture and then load weights.
Note the names of layers in the model have to match the ones in the saved dictionary. https://pytorch.org/tutorials/beginner/saving_loading_models.html<br>
51
51 Labs (30 min) This is the link to the code that I just explained:
The task for you now is to play with this code.
Try to change:
the number of layers,
the number of neurons,
activation functions,
optimizer.
Add plots to visualize how the training progresses (loss and accuracy) Think what aspects cannot be changed in the code<br>
The task for you now is to play with this code.
Try to change:
the number of layers,
the number of neurons,
activation functions,
optimizer.
Add plots to visualize how the training progresses (loss and accuracy) Think what aspects cannot be changed in the code<br>
52
52 Labs (20 min) Write the code for MNIST classification:
in Keras
in Pytorch Lightning
You can use ChatGPT.
Important: (i) try to understand the code, (ii) make it running.<br>
in Keras
in Pytorch Lightning
You can use ChatGPT.
Important: (i) try to understand the code, (ii) make it running.<br>