Two types of Machine Learning
There are two types of Machine Learning:
- Supervised Learning
- Unsupervised Learning
- This is the most common type of machine learning algorithm.
- You get labelled data in this case. For example: In a group of shapes, you are told that there are squares and circles.
- The “right answers” are given. In the above point, like you were told that there are only two right answers you can get, a square or a circle in the group of shapes.
- In Supervised Learning, you can come across two kinds of problems:
- Regression Problem – For Continuous data
- Classification Problem – For Discrete data
Using a labeled dataset, supervised learning models learn about different types of data. After the training process is complete, the model is tested on test data (a subset of the training set) and predicted.
Consider a dataset with different types of shapes, such as squares, rectangles, triangles, and polygons. The first step is to train the model for each shape.
- The given shape will be called a Square if it has four equal sides.
- Triangles are shapes with three sides.
- Hexagons are shapes with six equal sides.
- In the next step, we test our model by using the test set, and the model’s task is to identify shapes.
- When it finds a new shape, it classifies it based on a number of sides, and predicts its output based on the information.
Steps Involved in Supervised Learning:
- Determine the type of training dataset first
- The labeled training data should be collected/gathered.
- Organize the training dataset into a training dataset, a test dataset, and a validation dataset.
- Identify the input features of the training dataset so that the model can predict output accurately.
- Choose the appropriate algorithm for the model, such as a support vector machine or decision tree.
- The training dataset should be used to execute the algorithm. It is sometimes necessary to use validation sets as control parameters, which are subsets of training datasets.
- Provide the test set to evaluate the model’s accuracy. The model is accurate if it predicts the correct output.
Advantages of Supervised learning:
- On the basis of prior experiences, the model can predict the output using supervised learning.
- With supervised learning, we can know exactly what classes of objects exist.
- We can solve various real-world problems using supervised learning models, such as fraud detection and spam filtering.
Disadvantages of supervised learning:
- Complex tasks cannot be handled by supervised learning models.
- If the test data differs from the training data, supervised learning cannot predict the correct outcome.
- There was a lot of computation involved in training.
- We need enough knowledge about the classes of objects to perform supervised learning.
- No labels are given in the data. For example: In a group of shapes, you will have to find out what are the possible shapes with no options given to start with.
- Clustering is most commmonly used in the case of unsupervised learning of data as it tries to find similar attributes in data and combines them together. Google News extensively uses clustering algorithm.
- Some other examples of Clustering can be:
- Cloud providers like Amazon Web Services, Microsoft Azure and Google Cloud Platform organize their huge computing resources at the data centers as clusters.
- Social Media companies like Facebook, Twitter, Instagram, etc. use your information and activity to analyse your social network and suggest you people and content accordingly.
- Service providers like Infosys, DHL, Accenture, etc. have customers from different industries such as automobiles, manufacturing, finance, etc. They use clustering algorithms to divide their customers into “Market Segments“.
- Audio processing softwares extensively use clustering algorithms to categorize audio sources and how to deal with them.
- NASA uses clustering to analyse the huge amounts of data they get from their different astronomical (pun intended) research projects.
unsupervised learning, models are not supervised using training data, as the name suggests. Instead, models themselves uncover hidden patterns and insights from data. It can be compared to the learning that occurs in the human brain while learning new things. The definition of it is:
A regression or classification problem cannot be directly applied to unsupervised learning, since unlike supervised learning, we do not have corresponding output data. Unsupervised learning aims to identify the underlying structure of datasets, group those datasets according to similarities, and compress those datasets.
Unsupervised learning is important for a number of reasons, which are listed below Learning:
- Finding useful insights from data is easier with unsupervised learning.
- Humans learn to think by their own experiences, so unsupervised learning is much like that.
- As unsupervised learning involves unlabeled and uncategorized data, it is more important than supervised learning.
- To solve such cases, we need unsupervised learning since we do not always have input data that corresponds to output.
We have taken unlabeled input data, meaning that it is not categorized and corresponding outputs are not provided. In order to train the machine learning model, this unlabeled input data is fed into it. Initially, it interprets the raw data to find hidden patterns, then applies appropriate algorithms such as k-means clustering and Decision Trees.
After applying the appropriate algorithm, the algorithm divides the data objects into groups based on similarities and differences.
Advantages of Unsupervised Learning
- Due to the absence of labeled input data, unsupervised learning can be used for more complex tasks than supervised learning.
- In comparison to labeled data, unsupervised learning is more convenient since it is easier to obtain unlabeled data.
Disadvantages of Unsupervised Learning
- Due to its lack of corresponding output, unsupervised learning is intrinsically more difficult than supervised learning.
- Unsupervised learning may produce less accurate results because is not labeled, and algorithms do not know the exact output in advance.
Supervised vs. unsupervised learning
Unsupervised learning differs from supervised learning in how algorithms learn. As a training set, unlabeled data is provided to the algorithm. In contrast to supervised learning, there are no correct output values; the algorithm determines patterns and similarities within the data, rather than relating it to external measurements. Algorithms can be free to learn more about the data and discover interesting or unexpected findings that human beings aren’t aware of. In clustering (discovering groups in data) and association (predicting rules that describe the data), unsupervised learning is popular.