Mubbashir Assignment ML
Mubbashir Assignment ML
Section : A (Evening)
Roll No : 49
Seat No : 18252043
For example:
If you show a machine learning program lots of pictures of cats and dogs, it can
learn to recognize which is which on its own. Over time, as it sees more
examples, it gets better at making accurate guesses.
Supervised Learning
The machine is trained on labeled data, meaning the input data is paired
with the correct output.
Goal: Learn a mapping from input to output so it can predict outputs for
new, unseen inputs.
Predicting house prices (input: size, location; output: price).
Classifying emails as "spam" or "not spam."
Unsupervised Learning
The machine is given data without labels and must find patterns or
structure within it.
Goal: Discover hidden patterns or groupings in the data.
Customer segmentation (grouping customers with similar buying
habits).
Detecting anomalies like fraud in transactions.
Reinforcement Learning
The machine learns by interacting with an environment, receiving
rewards or penalties for actions.
Goal: Find the best strategy to maximize rewards over time.
Training robots to walk.
Teaching AI to play games like chess or video games.
3. What is the difference between AI, ML, and
Deep Learning?
Answer:
Aspect AI ML DL
Broad field simulating Subset of Al focused on Subset of ML using neural
Definition intelligence. learning from data. networks.
High-level tasks like Focus on algorithms and Uses large, layered neural
Complexity reasoning. predictions. networks.
Can work without large Needs structured data. Requires vast amounts of
Data Dependency data. data.
Self-driving cars, facial
Examples Chess- playing Al. Fraud detection. recognition.
5. Deep Learning
1. Training Set
The training set is used to train the machine learning model. It consists of input
data along with the correct labels (for supervised learning). The model learns
patterns, relationships, or representations from this data to make predictions.
Role: During training, the model adjusts its internal parameters to minimize
errors in its predictions based on the training data.
Composition: It typically makes up the larger portion of the available dataset,
often 70%-80% of the total data.
Example: In a spam email classifier, the training set would contain labeled
examples of emails, some marked as spam and others as not spam. The model
uses these examples to learn how to identify new emails as either spam or not.
2. Test Set
The test set is used to evaluate the performance of the trained model. It contains
data that the model has not seen before during training. This helps to simulate
how the model will perform on new, unseen data.
Role: By testing the model on this separate set of data, we get an indication of
its generalization ability—how well it can make predictions on data it wasn't
trained on.
Composition: It typically makes up the remaining 20%-30% of the total dataset.
Example: After training the spam email classifier on the training set, you would
test the model's accuracy by applying it to the test set, which contains emails the
model has never seen before.
10. What is feature scaling?
Answer:
In machine learning, "feature scaling" refers to the process of transforming
numerical features in a dataset to a common scale or range, ensuring that all
features contribute equally to the model by adjusting their values to be within a
similar range, typically between 0 and 1 or a standardized distribution centered
around 0, which is crucial for algorithms that rely on distance calculations like
K-Nearest Neighbors or algorithms using gradient descent like neural networks.
Input Data Uses Known and Labeled Uses Unknown Data as input
Data as input
Output data The desired output is given. The desired, output is not given.
Test of model We can test our model. We cannot test our model.