top of page

The Math Behind Artificial Intelligence

 

Doruk Alp Uzunarslan

Screen Shot 2023-11-30 at 01.12.36.png
Screen Shot 2023-11-30 at 01.14.16.png
Screen Shot 2023-11-30 at 01.15.54.png

Do you ever realize how often you use the assistance of artificial intelligence? In daily life, especially for younger generations, people tend to visit various websites throughout the day. Either knowingly or unaware, artificial intelligence (AI) system algorithms guide its clients. Those algorithms mostly depend on some math functions. So let’s dive deeper about those. 

Before we start, we first need to expand on the term AI algorithms. Artificial intelligence algorithms basically stand for the data interpretation way of an AI model. You can ask AI to classify images or recognize speech or many other things you can imagine. In order to complete those tasks, AI may take different paths which are usually human-supervised. An AI model can predict an outcome from different parameters based on previous cases (used in weather forecast programs, finance, healthcare, etc.), classify new entries in the way it shows similarities to previous entries (used in medical diagnosis, object detection, face recognition, etc.), or generate something relatively new (like ChatGPT or Dall-e). One of the most popular and used AI predictive algorithms is called “Linear Regression.” 

LINEAR REGRESSION


As the name suggests, this model draws a linear best-fit-line trying to hit all the data points. This way, it can predict further information according to the correlation it has discovered from previous data. To draw a linear line, the formula y = mx+b is utilized. The algorithm adjusts the values of m and b during training to minimize the error between predicted and actual values. This algorithm is commonly used in weather forecasting, economics, healthcare, etc. There are uncountable ways of application because it is both easy and effective. One example application is the house price prediction regarding its area in meter-squared. 

 

 


 

CLUSTERING


Now clustering is a very broad term in AI methods, specifically for many different kinds of clustering algorithms available. What it basically does is that it plots data points on a scatterplot and groups them accordingly. One of the most used algorithms for clustering is called “k-means.” The naming for this algorithm is based on its functionality. It puts k many random centroids for clusters into the plot. Then, it computes the distance between those centroids and data points and updates the centroid as the central point of those selected data points. This process iterates until those centroid does not change its positions. Projecting the data points on a plot, calculating the means, and calculating the distance between points. They all require some level of mathematics to an extent. 

Another important term in artificial intelligence is the loss/cost function. This function also has different types of methods as well and it plays a crucial role in order to evaluate the accuracy of an AI model. These functions help people assess whether the model is working properly or not. One instance of this is Mean Squared Error (MSE). Perhaps the most widespread one, MSE takes the difference between each data point and estimated point, squares it, and takes the mean average of those newly calculated numbers. The reason behind squaring the error is so that the error will either increase exponentially if it is high or be insignificant if it is small. This way, we can determine how accurate the AI model is.

Thus, AI algorithms like Linear Regression and Clustering utilize mathematical functions to interpret and predict data. These algorithms are elemental in AI, with Linear Regression predicting correlations in data, Clustering grouping similar data points, and Loss/Cost Functions like MSE evaluating model accuracy by measuring prediction errors. Mathematics serves as the backbone for these algorithms, letting AI take place in a set of diverse fields. 
 


 

References

Luz, Adrià. “Predicting House Prices with Linear Regression.” Medium, Medium, 24 Oct. 2020, datalesdatales.medium.com/predicting-house-prices-with-linear-regression-595422992c48. 
Sharma, Geetansh. “K-Mean Clustering and Its Use Cases in Security Domain.” Medium, Medium, 19 July 2021, geetanshsharma2018.medium.com/k-mean-clustering-and-its-use-cases-in-security-domain-86455f90ae3e. 
Media, Xiaoying Riley at 3rd Wave. “Loss Functions in Deep Learning Explained.” Brain Mentor’s - Training and Development, 20 June 2022, blogs.brain-mentors.com/loss-functions-in-deep-learning-explained-with-math/. 

© 2021 by Math Club. 

bottom of page