**2. Model TEFPA abbreviated from:**
- **T**ask ***(T)*** : Mean a task, algorith that **machine learning** need to do. their are 2 type of task is: reggresion and classification.
- **E**xperience ***(E)*** : basic algorithm is $X \rightarrow Z \rightarrow Y$. They are ***input*** and ***output***.
- **F**unction space ***(F)*** : machine learning need to find the optimize function space in the given function space = $WZ + b$.
- **P**erformance mesure ***( P)***:
- **A**lgorith ***(A)***: is the Algorith that constantly updated $W$ and $b$ so that the $\hat{y} \approx y$. Some basic Algorith in **ML** is: **GD** (Gradient Descent), **SGD** (Stochastic Gradient Descent), **Adam**,...
- Next part is the details of **TEFPA**:
-**T**ask has 2 important task is **Reggresion** and **Classification**:
- **Reggresion**: Can do any algorith that the **output** is a number. For example: calculate the price of the house, so the **input** is the information about the house, **output** is the price of the house we want to predict. Some other example: size of the flower, human weight,...
- **Classification**: Do the algorith that need to classify the data. For example: Differences between dogs and cats, Classify the house,...
-**E**xperience:
- **Input** is the data ML need to process to return **Output**. Depend on each Algorith will have different **Input**.
- Example 1: House price prediction ***(Reggresion)***: acreage, number of rooms,... are the input information for ML data prcessing. **Output** is the number represent the price of the house.
- Example 2 ***(Classification)***: Ear, nose, eyes,... are the input information for ML data prcessing and **Output** return "Dog" or "Cat".
- **Note**: Some time the input is image. In that case, we will have some intermediate step (PCA, CNN) to extract the feature about "Dog" và "Cat" in the image to $Z$. After that, we use feture $Z$ to classify "Dog" and "Cat".
- **Function space** is $\hat{y} = wz+b$ need to find the optimize function space in the given function space. So that $Y-\hat{Y}$ residual is minimize. $\hat{y} \approx y$ to do **Reggresion** or **Classification**.
- **Algorith**: after we find first $\hat{y}$, algorith will update $w$ and $b$ to find new $\hat{y}$ and count the residual $\hat{y}$ and $y$, constantly updated the weight $w$ and $b$ to find the good $\hat{y}$ ($\hat{y} \approx y$).
- ML in TEFPA:
- Linear Reggression:
- **T**ask: Reggression.
- **E**xperience: $X \rightarrow Z \rightarrow Y$.
- **F**unction space: $f(x) = WZ + b$.
- **P**erformance mesure: Mean Squared Error (MSE).
- **A**gorith: **GD** (Gradient Descent), **SGD** (Stochastic Gradient Descent), **Adam**,...
- Perceptron:
- **T**ask: Classification.
- **E**xperience: $X \rightarrow Z \rightarrow Y$.
- **F**unction space: $f(x) = sign(WZ + b)$.
- **P**erformance mesure: Calculate the wrong classification points.
- **A**gorith: random $\dot{W}$ and caculate $\hat{y}_i$ corresponding to each point $x_i$. constantly updated $W$ and $b$ every point $\hat{y}_i$ is wrong.
- MLP:
- **T**ask: Reggression or Classification.
- **E**xperience: $X \rightarrow Z \rightarrow Y$.
- **F**unction space: $f(x) = \sigma (WZ + b)$.
- **P**erformance mesure: Cross-entroy.
- **A**gorith: **GD** (Gradient Descent), **SGD** (Stochastic Gradient Descent),...
- K-means:
- **T**ask: Clustering.
- **E**xperience: $X \rightarrow Z$.
- **F**unction space: None.
- **P**erformance mesure: Distance between points to centroid.
- **A**gorith: Updated centrois.
**3. $X--(1)-->Z--(2)-->Y$:**
- Step (1):
- Is called extract feature. the purpose is to extract feature **Input** $x$. Example:
- If we put an image in step (1). its will extract the feature in the image, if the image is about dogs, its will extract the feature about: eyes, nose,...
- If we put an (1)