Welcome to the machine learning class, we will process projects from the simplest to the most complex, moving from simple mathematical operations to the complex.

Before starting this training, there are a few preparatory pieces of training you need to complete, it is recommended that you study the subjects you do not know in the list below.

**Preparatory Subject**

**Data Types**

3 different data types are very important to understand data, let’s look at all of the numerical, categorical, and ordinal. Let’s examine them one by one.

**Numerical** data are numerical data, it is divided into 2 types, the first value is discrete data with integer values, also we have infinite data it is called Continuous data.

**Categorical **data values that cannot be measured against each other are called bool and so on. values.

**Ordinal** data are categorical values that can be compared with each other, for example, integer values can be given.

**Simple Math Operations**

In this section, we will look at the most commonly used, mathematical operations mean, median, standard deviation, 4 operations, mod. We will also look at a few analysis functions.

import statistics as ss ss.mean([10 , 20 , 30])

The statistics library offers you special functions for many operations, very useful for machine learning. The mean function takes the average of all values.

import statistics as ss ss.median([10 , 20 , 30 , 40 , 50])

median value gives the middle value in the sorted order of all values, you can use the same statistics library to access.

import statistics as ss ss.mode([10 , 20 , 30 , 40 , 50 , 10 , 50 , 50])

The mode function prints the most used value on the screen. The statistics library is a library that collects all these operations, you can handle all these functions in just one library.

**Standard Deviation**

The standard deviation describes how spread the values are, calculating the pattern of increase. It is very easy to grasp even if it looks mixed.

import numpy as np np.std([1 , 2 , 3 , 4 , 5])

To understand this value, it is necessary to do some mathematical operation, the solution is below.

1 - take mean all element 2 - subtract average from all values 3 - square all values 4 - gather all values and average

**Percentiles Operation**

It shows which value is in which percentage as a percentage, you can find the percentages with the numpy library. The syntax of the function is simple. It has 2 arguments, the first argument takes your data, the second argument takes the percentage you want.

```
import numpy as np
x = [1 , 10 , 2 , 20 , 3 , 30 , 4 , 40]
np.percentile(x, 50)
```