Explain relation ship between AI,ML,DL?
Write two examples of machine learning?
Write Two examples of deep learning ?
What are types of data models?
Explain differences between rule based approach and learning based approach?
Learning-Based Approach
Rule-Based Approach
Uses predefined rules written by the
Machine learns patterns from data on its own
developer
Static – No learning from data Dynamic – Learns and improves from data
Cannot adapt to new or changing data Can adapt to changes in data
IF "Outlook = Sunny" THEN "Don’t play Learns from images of apples and bananas to
golf" identify them
Less data required Requires large amounts of labeled data
Limited to the rules defined Flexible – can generalize to new situations
Simple systems (e.g., spam filters, rule-based Complex tasks (e.g., image recognition, speech
chatbots) detection)
What is learning based approach?Explain categories of machine learning?
Learning-Based Approach
A learning-based approach is when a computer learns from examples or feedback, like humans.
Instead of writing rules, we give data, and the computer finds patterns by itself.
🔹 Example:
If we give 1000 dog images without any labels, the machine finds patterns like color, size, or fur,
and may even group them in new ways.
Categories of Machine Learning
What is Supervised Learning? Explain with two examples?
supervised learning model, the dataset which is fed to the machine is labelled.
Supervised Learning indicates having a supervisor as a teacher
Example: Coin Weight
Coins have different weights:
● 1 Euro = 5g
● 1 Dirham = 7g
● 1 Dollar = 3g
● 1 Rupee = 4g
Here, weight is the feature and coin name is the label.
The model learns from this and predicts coin types using weight.
Example 2:
In this example the model has learned from labeled input data and produces output to classify them as
dogs and cats.
What is Unsupervised Learning? Explain with two examples?
An unsupervised learning model works on unlabelled dataset.
Data fed to machine is random and the person training the model may not know full details.
The machine learns on its own by finding patterns, groups, or trends in the data.
Animal Clustering Example (Unsupervised Learning)
● The model gets animal pictures without any labels.
● It analyzes the data and looks for similar patterns.
● It groups animals based on features like shape, size, or color.
● The model forms two clusters:
● All Cats have been grouped into cluster 1
● All Dogs have been grouped into cluster 2
Example 2:
● A supermarket has customer shopping data.
There are no labels to show who buys groceries.
The model groups customers by patterns —
like grocery buyers and non-grocery buyers.
●
What is reinforcement learning?Explain with example?
● Reinforcement Learning is a type of machine learning where the system learns by doing
actions and learning from feedback.
● It improves through trial and error.
● When it makes a correct move, it gets a reward; when it makes a mistake, it gets a
penalty.
● The goal is to make better decisions over time to maximize rewards.
Example: Fruit Recognition
● A machine is shown a picture of an apple.
● It guesses "cherry" → This is wrong, so it receives negative feedback.
● It learns that this is not a cherry
● The same apple image is shown again.
● This time, it guesses "apple" → This is correct, so it gets positive feedback.
● From this, the machine learns to identify an apple more accurately in the future
What are subtypes of supervised learning?Explain with example?
Classification Model
● In classification, data is sorted into categories or labels.
● It works on a discrete dataset (data is in fixed groups, not continuous).
● The model learns from labeled data and classifies new inputs based on patterns.
Example : Spam Email Detection
● The model learns from emails marked as spam or not spam.
● It checks patterns (words, sender, links) and decides the category.
Regression Model
● Regression is used when the output is a continuous value (not fixed categories).
● The model learns patterns and predicts numerical values based on input data.
Example 1: Predicting Temperature
● Temperature can be any number (like 25.4°C), so it's a continuous value.
Regression model predicts tomorrow’s temperature based on past data.
What are subtypes of unsupervised learning?Explain with examples?
Clustering
● Clustering is an unsupervised learning method.
● It groups similar data into clusters without using any labels or categories.
● The machine finds patterns or similarities and puts similar items in the same group.
Example : Animals and Birds
● A model is given pictures of animals and birds without names.
● It groups animals into one cluster and birds into another, based on features like shape,
size, etc.
Association Rule
● Association Rule is also an unsupervised learning technique.
● It finds useful relationships between items in a large dataset.
● It is used in recommendation systems, like online shopping or grocery stores.
Example:
● If many customers who buy bread also buy butter,
● Then, when a new customer buys bread, the system may suggest butter.
● This rule is based on buying patterns and is useful for giving suggestions.
What are subtypes of deep learning?
● Deep Learning helps machines learn from large amounts of data without direct
programming.
● The machine trains itself by identifying patterns from the data.
● Two main types of Deep Learning models are:
o Artificial Neural Network (ANN)
o Convolutional Neural Network (CNN)
Artificial Neural Network (ANN)
● Inspired by the human brain and nervous system.
● Can automatically extract features from data without programmer help.
● Commonly used for tasks like text recognition, speech processing, etc..
2. Convolutional Neural Network (CNN)
● Mainly used for image processing tasks.
● Used in face recognition, medical image analysis, self-driving cars, etc.
What is Neural Network?Explain about layers of neural Network?
Neural networks are loosely modelled on how neurons in the human brain work.
They can automatically extract features from data without needing the help of the
programmer. It is fast and efficient for problems with a very large dataset.
Working of Neural Network:
. Input Layer
● This is the first layer of the neural network.
● Its job is to receive the data and pass it to the next layer.
● No processing happens in this layer.
2. Hidden Layer
● These are the middle layers where all the processing happens.
● These layers are called “hidden” because they are not visible to the user.
● Each node in the hidden layer performs some machine learning operations on the data it
receives.
● The hidden layer uses weights and biases to compute the data.
● After each try, weights are adjusted based on the difference between expected and
actual output.
● The number of hidden layers and nodes can change depending on the complexity of the
task.
3. Output Layer
● This is the final layer of the network.
● It gives the final result to the user.
Like the input layer, it does not process the data. It only shows the output.
What are real world applications of neural network?
Real-world Applications
● Facial recognition
● Customer support chatbot
● Vegetable price prediction