Deep Learning Ascs
Deep Learning Ascs
Supervised learning is a type of machine learning algorithm that learns from labeled data. Labeled
data is data that has been tagged with a correct answer or classification.
Supervised learning, as the name indicates, has the presence of a supervisor as a teacher. Supervised
learning is when we teach or train the machine using data that is well-labelled. Which means some
data is already tagged with the correct answer. After that, the machine is provided with a new set of
examples(data) so that the supervised learning algorithm analyses the training data(set of training
examples) and produces a correct outcome from labeled data.
For example, a labeled dataset of images of Elephant, Camel and Cow would have each image
tagged with either “Elephant” , “Camel”or “Cow.”
Regression: A regression problem is when the output variable is a real value, such as
“dollars” or “weight”.
Supervised learning deals with or learns with “labeled” data. This implies that some data is already
tagged with the correct answer.
1- Regression
Regression is a type of supervised learning that is used to predict continuous values, such as house
prices, stock prices, or customer churn. Regression algorithms learn a function that maps from the
input features to the output value.
Linear Regression
Polynomial Regression
2- Classification
Classification is a type of supervised learning that is used to predict categorical values, such as
whether a customer will churn or not, whether an email is spam or not, or whether a medical image
shows a tumor or not. Classification algorithms learn a function that maps from the input features to
a probability distribution over the output classes.
Evaluating supervised learning models is an important step in ensuring that the model is accurate
and generalizable. There are a number of different metrics that can be used to evaluate supervised
learning models, but some of the most common ones include:
For Regression
Mean Squared Error (MSE): MSE measures the average squared difference between the
predicted values and the actual values. Lower MSE values indicate better model
performance.
Root Mean Squared Error (RMSE): RMSE is the square root of MSE, representing the
standard deviation of the prediction errors. Similar to MSE, lower RMSE values indicate
better model performance.
Mean Absolute Error (MAE): MAE measures the average absolute difference between the
predicted values and the actual values. It is less sensitive to outliers compared to MSE or
RMSE.
For Classification
Accuracy: Accuracy is the percentage of predictions that the model makes correctly. It is
calculated by dividing the number of correct predictions by the total number of predictions.
Precision: Precision is the percentage of positive predictions that the model makes that are
actually correct. It is calculated by dividing the number of true positives by the total number
of positive predictions.
Recall: Recall is the percentage of all positive examples that the model correctly identifies. It
is calculated by dividing the number of true positives by the total number of positive
examples.
F1 score: The F1 score is a weighted average of precision and recall. It is calculated by taking
the harmonic mean of precision and recall.
Confusion matrix: A confusion matrix is a table that shows the number of predictions for
each class, along with the actual class labels. It can be used to visualize the performance of
the model and identify areas where the model is struggling.
Spam filtering: Supervised learning algorithms can be trained to identify and classify spam
emails based on their content, helping users avoid unwanted messages.
Image classification: Supervised learning can automatically classify images into different
categories, such as animals, objects, or scenes, facilitating tasks like image search, content
moderation, and image-based product recommendations.
Medical diagnosis: Supervised learning can assist in medical diagnosis by analyzing patient
data, such as medical images, test results, and patient history, to identify patterns that
suggest specific diseases or conditions.
Fraud detection: Supervised learning models can analyze financial transactions and identify
patterns that indicate fraudulent activity, helping financial institutions prevent fraud and
protect their customers.
Natural language processing (NLP): Supervised learning plays a crucial role in NLP tasks,
including sentiment analysis, machine translation, and text summarization, enabling
machines to understand and process human language effectively.
Supervised learning allows collecting data and produces data output from previous
experiences.
We have complete control over choosing the number of classes we want in the training data.
Training for supervised learning needs a lot of computation time. So, it requires a lot of time.
Unsupervised learning is a type of machine learning that learns from unlabeled data. This means that
the data does not have any pre-existing labels or categories. The goal of unsupervised learning is to
discover patterns and relationships in the data without any explicit guidance.
Unsupervised learning is the training of a machine using information that is neither classified nor
labeled and allowing the algorithm to act on that information without guidance. Here the task of the
machine is to group unsorted information according to similarities, patterns, and differences without
any prior training of data.
Unlike supervised learning, no teacher is provided that means no training will be given to the
machine. Therefore the machine is restricted to find the hidden structure in unlabeled data by itself.
You can use unsupervised learning to examine the animal data that has been gathered and
distinguish between several groups according to the traits and actions of the animals. These
groupings might correspond to various animal species, providing you to categorize the creatures
without depending on labels that already exist.
Key Points
Unsupervised learning allows the model to discover patterns and relationships in unlabeled
data.
Clustering algorithms group similar data points together based on their inherent
characteristics.
Feature extraction captures essential information from the data, enabling the model to
make meaningful distinctions.
Label association assigns categories to the clusters based on the extracted patterns and
characteristics.
Example
Imagine you have a machine learning model trained on a large dataset of unlabeled images,
containing both dogs and cats. The model has never seen an image of a dog or cat before, and it has
no pre-existing labels or categories for these animals. Your task is to use unsupervised learning to
identify the dogs and cats in a new, unseen image.
For instance, suppose it is given an image having both dogs and cats which it has never seen.
Thus the machine has no idea about the features of dogs and cats so we can’t categorize it as ‘dogs
and cats ‘. But it can categorize them according to their similarities, patterns, and differences, i.e.,
we can easily categorize the above picture into two parts. The first may contain all pics
having dogs in them and the second part may contain all pics having cats in them. Here you didn’t
learn anything before, which means no training data or examples.
It allows the model to work on its own to discover patterns and information that was previously
undetected. It mainly deals with unlabelled data.
Clustering: A clustering problem is where you want to discover the inherent groupings in the
data, such as grouping customers by purchasing behavior.
Association: An association rule learning problem is where you want to discover rules that
describe large portions of your data, such as people that buy X also tend to buy Y.
Clustering
Clustering is a type of unsupervised learning that is used to group similar data points
together. Clustering algorithms work by iteratively moving data points closer to their cluster centers
and further away from data points in other clusters.
1. Exclusive (partitioning)
2. Agglomerative
3. Overlapping
4. Probabilistic
Clustering Types:-
1. Hierarchical clustering
2. K-means clustering
Anomaly detection: Unsupervised learning can identify unusual patterns or deviations from
normal behavior in data, enabling the detection of fraud, intrusion, or system failures.
Scientific discovery: Unsupervised learning can uncover hidden relationships and patterns in
scientific data, leading to new hypotheses and insights in various scientific fields.
Image analysis: Unsupervised learning can group images based on their content, facilitating
tasks such as image classification, object detection, and image retrieval.
Unsupervised learning can help you gain insights from unlabeled data that you might not
have been able to get otherwise.
Unsupervised learning is good at finding patterns and relationships in data without being
told what to look for. This can help you learn new things about your data.
The user needs to spend time interpreting and label the classes which follow that
classification.
Unsupervised learning can be sensitive to data quality, including missing values, outliers, and
noisy data.
Model We can test our model. We can not test our model.
Reinforcement learning
RL operates on the principle of learning optimal behavior through trial and error. The agent takes
actions within the environment, receives rewards or penalties, and adjusts its behavior to
maximize the cumulative reward. This learning process is characterized by the following elements:
Policy: A strategy used by the agent to determine the next action based on the current
state.
Reward Function: A function that provides a scalar feedback signal based on the state and
action.
Value Function: A function that estimates the expected cumulative reward from a given
state.
The problem is as follows: We have an agent and a reward, with many hurdles in between. The
agent is supposed to find the best possible path to reach the reward. The following problem
explains the problem more easily.
The above image shows the robot, diamond, and fire. The goal of the robot is to get the reward
that is the diamond and avoid the hurdles that are fired. The robot learns by trying all the possible
paths and then choosing the path which gives him the reward with the least hurdles. Each right
step will give the robot a reward and each wrong step will subtract the reward of the robot. The
total reward will be calculated when it reaches the final reward that is the diamond.
Input: The input should be an initial state from which the model will start
Output: There are many possible outputs as there are a variety of solutions to a particular
problem
Training: The training is based upon the input, The model will return a state and the user
will decide to reward or punish the model based on its output.
Deep learning, a branch of artificial intelligence, uses neural networks to analyze and learn from
large datasets. It powers advancements in image recognition, natural language processing, and
autonomous systems. Despite its impressive capabilities, deep learning is not without its
challenges. It includes issues such as data quality, computational demands, and model
interpretability are common obstacles.
Deep learning faces significant challenges such as data quality, computational demands, and
model interpretability. This article explores Deep Learning Challenges and strategies to address
them effectively. Understanding these challenges and finding ways to overcome them is crucial for
successful implementation.