> For the complete documentation index, see [llms.txt](https://digitalgarden.batamladen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://digitalgarden.batamladen.com/notes/machine-learning/learning-algorythm-types/supervised-ml.md).

# Supervised ML

## **What is Supervised ML?**

**Supervised Machine Learining** involves a series of functions that map an input to an output, based on a series of input → outpt fails.

So the process typically involves:

1. **Training Data**: This is the dataset used to train the model. It includes both the input features and the corresponding target labels. The model learns from this data to make predictions.
2. **Testing Data**: This dataset is used to evaluate the performance of the model. It includes input features but no target labels during the training process. After training, the model makes predictions on the test data, and these predictions are compared to the actual labels to assess accuracy, precision, recall, and other performance metrics.

{% content-ref url="/pages/v2R5ZC2HB4U2QJZtCDS5" %}
[Train-Test Split](/notes/machine-learning/training-and-testing-data/train-test-split.md)
{% endcontent-ref %}

Fore example with this model we could predict a shoe size for a child that is 10yo, based on the data below:

<table><thead><tr><th width="356">Age</th><th>Shoe Size</th></tr></thead><tbody><tr><td>7</td><td>19.5</td></tr><tr><td>8</td><td>21</td></tr><tr><td>9</td><td>22.3</td></tr><tr><td>11</td><td>24.8</td></tr></tbody></table>

***

## Types of supervised learning:

1. Regression
2. Classification

***

### Regression

In regression, we aim to predict real values based on the features present in the training data. Unlike classification, where we assign classes, regression focuses on estimating continuous and numerical values.

#### Regression algorithms:&#x20;

* Linear regression
* Logistic regression
* Decision Tree Regression
* Random Forest Regression
* Ridge regression
* Lasso regression

***

### Classification

Classification is a type of supervised learning technique in machine learning (ML) used for predicting categorical outcomes. Unlike regression, which deals with predicting continuous numerical values, classification models are designed to assign input data to one of several predefined categories or classes.

#### **Types of Classification**:

* **Binary Classification**: The target variable has two possible classes (e.g., spam/not spam, disease/healthy).
* **Multiclass Classification**: The target variable has more than two classes (e.g., classifying types of animals, predicting digit values).
* **Multilabel Classification**: Each instance can belong to multiple classes simultaneously (e.g., tagging an image with multiple objects).

#### Classification algorithms:

* Decision Trees Classification
* [Random Forest](/notes/machine-learning/learning-algorythm-types/supervised-ml/random-forest.md) Classification
* K-Nearest Neighbors
* Support Vector Machines (SVM)
* Neural Networks


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://digitalgarden.batamladen.com/notes/machine-learning/learning-algorythm-types/supervised-ml.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
