Machine learning is part of artificial intelligence (AI) that focuses on using mathematical operation to learn from data and make predictions or decisions nearly autonomously. There are three main types of machine learning:
In supervised learning, the model is trained on labeled data, meaning that each input is paired with its corresponding correct output. The algorithm analyzes these data and learns a function that maps new inputs to the appropriate output. This method is particularly useful for classification and regression problems. Classification tasks include spam detection in emails, while regression models predict continuous values, such as real estate prices or stock market trends. Common algorithms in this domain include decision trees, neural networks, and support vector machines (SVM).
A typical regression function can be represented as: \begin{equation} y = w^T x + b \end{equation} where x is the input vector, w is the weight vector, and b is the bias term.
Unlike supervised learning, unsupervised learning deals with unstructured, unlabeled data. The goal is to uncover patterns, relationships, or structures within the data. This method is commonly used for clustering, where data points are grouped based on similarities. An example is customer segmentation, where businesses categorize customers based on purchasing behavior. Another application is dimensionality reduction, which simplifies large datasets by extracting essential features for efficient analysis. Popular algorithms in unsupervised learning include K-means clustering, hierarchical clustering, and principal component analysis (PCA).
The optimization problem in K-means clustering is solved by minimizing the following objective function: \begin{equation} J = \sum_{i=1}^{m} \sum_{j=1}^{k} w_{ij} | x_i – \mu_j |^2 \end{equation} where x represents the data points, μ the cluster centers, and w the assignment variable.
Reinforcement learning is based on a trial-and-error approach. An agent interacts with an environment and learns to make optimal decisions through rewards or penalties. This method is widely used in robotics, game development, and optimizing complex processes. A well-known example is DeepMind’s AlphaGo, which mastered the game of Go through reinforcement learning. Important algorithms in this field include Q-learning, Deep Q-Networks (DQN), and Proximal Policy Optimization (PPO).
The update of Q-values in Q-learning follows this equation (Bellman Equation): \begin{equation} Q(s, a) \leftarrow Q(s, a) + \alpha \left( r + \gamma \max_{a‘} Q(s‘, a‘) – Q(s, a) \right) \end{equation} where s is the current state, a is the action, r is the reward, alpha is the learning rate, and gamma is the discount factor.
Each of these three learning methods has specific applications. Supervised learning is particularly useful for predefined tasks with labeled data, unsupervised learning helps discover hidden patterns in unstructured datasets, and reinforcement learning is ideal for scenarios where an agent must learn through interaction with an environment to develop optimal strategies. The choice of the appropriate learning method always depends on the specific problem and the available data.