Machine Learning Algorithms and How to Select the Best One (1/3)
Over the coming weeks, LISDATA will publish a series of posts related to different algorithms used in Machine Learning.
Types of Machine Learning Algorithms
The vast majority of Machine Learning algorithms fall into three main groups:
- Supervised Learning: this type of algorithm is useful when a known property exists for a set of elements, but that same property is unknown for a specific element. These algorithms help us predict what that unknown property is.
- Unsupervised Learning: this type of algorithm is useful for discovering implicit, unknown relationships within a dataset. In other words, it allows for considering that various elements belong to the same group or different groups by studying their characteristics.
- Reinforcement Learning: this type of algorithm is a blend of the previous two types. As this is an introductory post, we will not delve into these algorithms due to their complexity.
Below, we review some of the supervised and unsupervised learning algorithms.
Supervised Learning Algorithms
The first and most intuitive algorithms we encounter are decision trees.
In this post, we already explained the importance and basic operation of these types of algorithms. Decision trees essentially seek to classify elements based on a series of variables.
Within this group of algorithms, we find some such as:
- CART (Classification And Regression Tree)
- ID3 (Iterative Dichotomiser 3)
- CHAID (CHi-squared Automatic Interaction Detector)
Another of the most important supervised learning algorithms is the Naive Bayes classification algorithm.
Based on known elements, this algorithm is capable of classifying a new element without knowing which group it belongs to.
This algorithm is typically used in the following cases:
- Autonomous cars: due to its ability to determine the speed the vehicle should maintain based on, for example, the state of the road or its incline.
- Locating emails considered Spam after analyzing the words that appear in the message.
- Classifying articles by the topic they discuss.
The third algorithm within this group is ordinary least squares regression.
This algorithm attempts to estimate unknown values. To do this, it uses the mathematical method known as linear least squares regression. It tries to fit a line as closely as possible to a group of elements and, from there, interpret the potential result for an element with a property to be determined.
To conclude this group of algorithms, it should be mentioned that there are others of this type, such as: logistic regression, support vector machines, and ensemble methods.
Unsupervised Learning Algorithms:
The first algorithms we find in this group are clustering algorithms. LISDATA has already conducted a study of Principal Component Analysis alongside a clustering algorithm: K-means.
These algorithms are used to group together the elements that are most similar to each other. In other words, they are algorithms that group elements based on a specific characteristic.
In this group, we find different types of algorithms, such as:
- Centroid-based algorithms: if we represent the elements on a scatter plot, these algorithms calculate the midpoint that minimizes distances. K-means is an algorithm of this type.
- Density-based algorithms: these algorithms seek to group points by their proximity to surrounding points. An algorithm included in this family would be K-NN (k-nearest neighbors).
As additional information, it is worth mentioning the existence of connectivity-based algorithms, probabilistic algorithms, dimensionality reduction techniques, and neural networks, which would also fall within this group.
Another algorithm that fits into this unsupervised learning group is the PCA (Principal Component Analysis) algorithm. This algorithm, discussed in this post, performs a reduction from initial variables to the minimum possible number of them. The goal is to represent the maximum amount of information using the fewest variables possible.
Within unsupervised learning, we find algorithms such as the Singular Value Decomposition algorithm or independent component analysis (ICA).
How to choose the best algorithm for our project?
The first and most important steps to successfully choosing the algorithm that best suits our needs are:
- Determine what we want to achieve
- See what data we have available
Once these two points are clear, and with knowledge of existing machine learning algorithms, we can choose the one that best fits our needs.
For example, if we want to know who wrote a text, our algorithm would be Naive Bayes; however, if we want to know where to geographically place two hospitals in a territory and want them to be as close as possible to the largest population centers, our algorithm is K-means.
If you want to learn more about advanced analytics, discover our advanced data analytics section.
In the next entry…
In the case we will cover in the next post, we will perform a consumption prediction. Starting from past consumption, we will try to predict future consumption and see how our prediction aligns with reality. We invite you to visit our blog while you wait.