An AI (artificial intelligence) model is a program that has been trained on a set of data (called the *training set*) to recognize certain types of patterns. AI models use various types of algorithms to reason over and learn from this data, with the overarching goal of solving business problems. There are many different fields that use AI models with different levels of complexity and purposes, including computer vision, robotics, and natural language processing.

As mentioned above, a machine learning algorithm is a procedure that learns from data to perform pattern recognition and creates a machine learning model. Below is a sampling of just a few simple machine learning algorithms:

*k*-nearest neighbors: The*k*-nearest neighbors algorithm is used to classify data points based on the classification of their*k*nearest neighbors (where*k*is some integer). For example, if we have*k*= 5, then for each new data point, we will give it the same classification as the majority(or the plurality) of its closest neighbors in the data set.- Linear regression: Linear regression attempts to define the relationship between multiple variables by fitting a linear equation to a dataset. The output of a linear regression model can then be used to estimate the value of missing points in the dataset.
*k*-means: The*k*-means algorithm is used to separate a dataset into*k*different clusters (where*k*is some integer). We start by randomly choosing*k*points (called centroids) in space, and assigning each point to the closest centroid. Next, we calculate the mean of all the points that have been assigned to the same centroid. This mean value then becomes the cluster’s new centroid. We repeat the algorithm until it converges, i.e. the position of the centroids does not change.

AI and machine learning algorithms are fundamentally mathematical entities, but can also be described using *pseudocode*, i.e. an informal high-level language that looks somewhat like computer code. In practice, of course, AI models can be implemented with any one of a range of modern programming languages. Today, various open-source libraries (such as scikit-learn, TensorFlow, and Pytorch) make AI algorithms available through their standard application programming interface (API).

Finally, an AI model is the output of an AI algorithm run on your training data. It represents the rules, numbers, and any other algorithm-specific data structures required to make predictions about unseen test data.

The decision tree algorithm, for example, creates a model consisting of a tree of if-then statements, each one predicated on specific values. Meanwhile, deep neural network algorithms create a model consisting of a graph structure that contains many different vectors or weights with particular values.

Please visit these pages to learn more about AI models or how AI models are used as Edge AI.