# A4 SL introduction to Machine Learning
:::info
This is a note for notes of the IB Syllabus starting M27. If you want to see more, you should check the note of the teaching material index here:
https://hackmd.io/@dprieto/David-Index#Computer-Science-New-syllabus-first-examination-2027
:::
:::warning
:warning: :construction: This note is under construction and unfinished yet.:warning: :construction:
:::
# Structure of this approach
This will cover mainly 2 aspects, general information about ethics in data and basic definitions of Machine Learning concepts
In the ethics part first we're going to see problems with data gathering (in general) and GDPR basic concepts. These are not going to be explicitly asked in exams but they include useful concepts to articulate ethical and social problems that will arise later.
# Data and GDPR
Remember that everything that we cover with GDPR is a law, it's something that only applies to Europe but it holds concepts that are useful for understanding the underlying problems.
## Reference for GDPR
https://commission.europa.eu/law/law-topic/data-protection/data-protection-explained_en
(the law itself)
### What is personal data?
//TO-DO (by the students)
### What is sensitive personal data?
//TO-DO (by the students)
### What is consent regarding personal data?
If you need more info about consent (this is more about sex, but the concept is the same)
https://www.youtube.com/watch?v=oQbei5JGiT8
https://www.youtube.com/watch?v=NLKWEUhOHss
//TO-DO (by the students)
### What is **informed** consent and what does it imply?
//TO-DO (by the students)
## Videos used in class
Data: (Philosophy tube)
{%youtube fCUTX1jurJ4 %}
Ethics in AI: (Also Philosophy tube)
{%youtube AaU6tI2pb3M %}
# Machine learning
## Other lexicon that is needed
//TO-DO by the students
* Bias
* Fairness (in this context)
* Accuracy of data
* Fairwashing
* Counterfactual explanations
* Large-scale computing
* Cloud computing
Extra ball:
* Digital epidermalization
## Definition
//TO-DO by the students
## Types of machine learning
### Reinforcement learning
Related video about trackmania with reinforcement learning. Take notes!
https://www.youtube.com/watch?v=Dw3BZ6O_8LY
{%youtube Dw3BZ6O_8LY %}
### Unsupervised learning
### Supervised learning
### Transfer learning
## Problems to solve by machine learning
### Natural language processing (NPL)
### Object detection and classification
## Concepts of machine learning
### Deep learning
### Neural network
### Convoluted neural network (CNN)
### Recursive neural network (RNN)
### Transformer neural network (TNN)
## Scenarios and software
In this part you will have different scenarios and you will need to dicuss the suitability of one approach or other and also ethical limitations.
* CV processing
* NLP
* Object detection (remember the bias of the PDM)
* Sentiment analysis
* Medical diagnosis
* Chatbots for specific scenarios
## Scenarios and hardware
Remember the design process and environments? Review it and then, we apply machine learning.
### Development and testing
### Data processing and feture engineering
### Model training and deep learning
### Lareg-scale deployment and production
### Edge computing
## Phisycal elements that you need to know
### GPU
Go to [A1.1 Notes and resources](/6LgCmT4IToOkOu0CuV3UBQ)
### TPU
### Tensor
### Field-programmable gate arrays
### Application-specific integrated circuits
(what is an integrated circuit?)
### Edge devices
### Data centers
#### High-performance computing centres
#### Cloud-based platforms
(remember a A1. when we discussed IaaS, PaaS, etc. )
# Example questions:
These are exam like questions, answer them with your own words
Evaluate the use of cameras for detecting crimes on the street [4]
Discord is a website where users can log in and chat or make calls together.
Discuss the use of IDs for age verification for [Discord](https://www.bbc.com/news/articles/c1d67vdlk1ko) [6]
Outline how bias can be introduced into a machine learning model [2]
Explain **one** example of a bias that can be introduced into a machine learning model [3]
Outline how an algorithm can be seemed as fair in the context of machine learning [2]
A tech company that produces software for phones is introducing a Machine Learning Model to analyze data from its users that have downloaded their applications.
Analyze the technical considerations of using machine learning in this scenario[6]
Outline the concept of machine learning [2]
Describe the key differences between supervised and unsupervised learning. [3]
Describe the key differences between supervised and reinforced learning [3]
A software development company is adopting artificial intelligence and machine learning models in their human resources and hiring procedures.
* a) Outline how transfer learning might be used in this scenario. [2]
* b)Discuss the ethical considerations of using machine learning in this scenario. [6]
Define bias [1]
An IB student, Pepa, wants to create a machine learning algorithm to do a chatbot for helping other students to do math. However, since Pepa lives and studies in a mountain, she cannot rely on the connection to the internet so she wants to use her laptop.
Describe the hardware constraints of this scenario and a possible solution [3]