Type of learning models
Types of Learning
KNN Algorithm
K-Nearest Neighbors (KNN) is a simple, non-parametric algorithm used for classification and regression. In KNN, the input consists of the k closest training examples in the feature space, and the output is a class membership for classification or a property value for regression.
Supervised Learning
In this learning, machine learning models and algorithms are trained with a dataset that has the features and the output class variables. Usually, the dataset is divided into two parts: one for training and another for testing.

The division ratio is normally 80:20. Training our datasets will make the machine learning model intelligent and efficient, while the testing part will check the performance of the model using diabetic data.
Diabetic Data (D1)
Age | B.P. | Glucose / mg |
|---|---|---|
35 | 90/40 | 95 |
Unsupervised Learning
Unsupervised Learning is a type of training for ML models to draw inferences from a dataset consisting of input data without labeled responses, that is, a dataset with feature values only without the class label. For example, marks of students in MCA 2nd year in machine learning. With the help of this dataset, we can decide which student is good or poor. Machine learning can use this as an example of unsupervised learning.
Clustering Problem: In this, we need to develop an ML model/algorithm to form various groups or clusters for the given datasets. Example: clustering of a population based on financial status.
Anomaly Detection: Identifying unusual patterns or outliers in data.
Reinforcement Learning
This model is very much close to human learning. Through this training, a machine learning model can be taught to follow instructions, conduct tests, and operate equipment. Reinforcement learning is the problem of getting an agent to act in the world environment to maximize its reward. A learner is not told what actions to take, as in most forms of machine learning, but instead must discover which actions yield the most reward by trying them. For example, training a seal to swim in the ocean or teaching a dog a new trick. We cannot tell it what to do, but we can reward or punish it if it does right or wrong things. It has to find out what it did that made it get the reward or punishment. We can use a similar method to train computers to do many tasks such as playing chess, scheduling jobs, etc.
Semi-Supervised Learning
Semi-supervised learning is a type of machine learning that falls in between supervised and unsupervised learning. It is a method that uses a small amount of labeled data and a large amount of unlabeled data to train a model. The goal of semi-supervised learning is to learn a function that can accurately predict the output variable based on the input variable, similar to supervised learning. Semi-supervised learning is particularly useful when there is a large amount of unlabeled data available, but it is too expensive to label all of it.
Mixture of both types of datasets: some are labeled, some are unlabeled, somewhere in between supervised and unsupervised.
Example:
Text Classification: The goal is to classify a given text into one or more predefined categories. Semi-supervised learning can be used to train a text classification model using a small amount of labeled data and a large amount of unlabeled text data.
Image Classification: The goal is to classify a given image into one or more predefined categories. Semi-supervised learning can be used to train an image classification model using a small amount of labeled data and a large amount of unlabeled image data.
Anomaly Detection: The goal is to detect patterns and observations that are unusual or different from normal.
Applications of Semi-Supervised Learning:
Speech Analysis: Since labeling audio files is a very intensive task, semi-supervised learning is a natural approach to solve this problem.
Internet Content Classification: Labeling each webpage is an impractical and unfeasible process, thus using semi-supervised learning algorithms. The Google search algorithm uses a variant of semi-supervised learning to rank the relevance of a web page for a given query.
Protein Sequence Classification: Since DNA testing can involve very large sizes, DNA testing uses the ability of semi-supervised learning to classify DNA.
Association Rule: X implies Y, that is, the occurrence of X induces the occurrence of Y. X is associated with Y. If people buy X, they are likely to buy Y. In finding an association rule X implies Y, we are interested in learning the conditional probability where Y is the product a customer may buy and X is the product they have already purchased. There are several algorithms for generating association rules, such as the Apriori algorithm and FP-Growth algorithm.
Application of ML
Medical Field: Machine learning is widely used in the field of medical science for detecting disease probability and for diagnosing different diseases. Examples include neurosurgery, cancer detection, liver disease detection, and lung disease detection. In the coming time, ML will be the main supporting technique in medical science.
Finance Sector: ML is widely used in the finance and banking sector, especially in fraud detection, transaction safety, marketing advertisement strategies, potential customer identification, and product recommendation.
Weather Forecasting: ML plays a crucial role in weather forecasting, strong alerts, tsunami alerts, etc. Hidden Markov Model (HMM) is a famous ML technique used for forecasting stock market trading. In this, ML algorithms enable AI parts of stock managers responsible for managing funds.
Speech Recognition: Systems like Alexa use speech recognition to communicate with us. In the future, we will have many applications in daily life based on speech recognition.
Image Recognition: Image recognition is a significant development in the field of deep learning. The task, which started with classifying images between cats and dogs, has evolved up to the level of face recognition and real-world use cases based on that, like employee attendance tracking. It has also helped in the healthcare industry by employing smart systems for disease recognition and diagnosis.
