Mathematics is the building block for data science. This blog focuses on various mathematical concepts which are used in machine learning. The mathematical concepts used for machine learning are categorized into statistics, probability, differential calculus.There are many uses of mathematics in data science. Let’s discuss one by one.
In mathematical terms, statistics is defined as the set of equations, which are helpful to interpret and analyse things. In machine learning, statistics plays a very important role in understanding the data in a dataset. Various statistical analysis helps us to understand the distribution, summary, etc of a data.
1.1. Exploratory data analysis
EDA or exploratory data analysis is one of the critical steps in data science. It helps us to analyse the data patterns, errors, outliers, etc. Statistics being the backbone for this step, various concepts such as standard deviation, variance, mean, median, etc are used.
We consider data which is outside 3 standard deviations (In general) as the outliers. We understand data distribution by plotting bar graph, which helps us understand whether data is distributed across mean or is the data skewed towards one side.
Probability is the branch of mathematics which is concerned with numerical description of explaining how likely an event is to occur. This theory is very useful in making predictions. Estimation and predictions constitute an important part of Data science and thus, most of the concepts involve probability theory.
2.1. Classification algorithms
Most of the classification problems in data science involves the predictions of classes, where we classify each observation to exactly one class. The base idea behind the classification problem is probability. The probabilities of all the classes are calculated based on the trained data, the class with the highest probability is assigned to that observation.
2.2. Loss function
One of the loss functions used for classification problems is cross entropy loss which is measure of classification model. Cross-entropy loss increases as the predicted probability diverges from the actual label. It is one of the most important calculation when it comes to machine learning for classification.
3. Differential calculus
Data science is incomplete without differential calculus. Differentiation forms an intrinsic part of data science, especially in machine learning. Differentiation or calculus is study of rate of changes of quantities.
3.1. Gradient Descent
In machine learning, our goal is to reduce the cost to our input data. We use cost function, which is measure of error in the predictions of the model. To achieve the lowest possible value of the cost function, is the main goal of gradient descent which in turn improves the accuracy. Gradient descent uses differentiation where the partial derivative of cost function is calculated which will point to the global minima. The downfall of gradient is controlled by learning rate.
The same concept is applied for deep learning models where the optimizer used as gradient descent will use the partial derivative concept to adjust the weights to get the optimal weights.