0% found this document useful (0 votes)
25 views

ML Notes Mid-01 (Unit-01,02)

The document provides an overview of human learning and machine learning including definitions, characteristics, types and applications. It discusses supervised, unsupervised and reinforcement machine learning and gives examples of each. The document also explores the connection between human and machine learning.

Uploaded by

alonewarrior2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

ML Notes Mid-01 (Unit-01,02)

The document provides an overview of human learning and machine learning including definitions, characteristics, types and applications. It discusses supervised, unsupervised and reinforcement machine learning and gives examples of each. The document also explores the connection between human and machine learning.

Uploaded by

alonewarrior2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Introduction to Machine Learning

Unit-01 Introduction to Machine Learning

1.1.1 Overview of Human Learning and Machine Learning

Human Learning:
1. Definition: Human learning is how people learn things like facts, skills, and how to do stuff. It
happens when we experience things, get instructions, watch others, or practice.

2. Characteristics:
- Social Learning: Humans often learn from each other through social interactions, such as
teachers, peers, or mentors.
- Thinking Stuff: Learning in humans involves thinking processes like seeing, remembering,
solving problems, and using our brains.
- Changing with Experience: We can change how we learn based on what we've been through and
where we are.
- Learning from Others: We often learn by watching and listening to people like teachers, friends,
or mentors.
- Can Get Complicated: Learning for humans can be quite complex and is affected by things like
motivation, feelings, and our unique differences.
- Cognitive Process: Human learning involves cognitive processes such as perception, memory,
reasoning, and problem-solving.
-
3. Types of Learning:
- Explicit Learning: Deliberate, conscious learning, often through formal education.
- Implicit Learning: Unconscious learning through exposure and experience.
- Experiential Learning: Learning through hands-on experiences and reflection.
- Social Learning: Learning from others through observation and interaction.

4. Applications: Human learning is the foundation for education, training, getting better at things, and
coming up with new ideas. It's basically how we achieve anything in life.

1|Page
Machine Learning:
1. Definition: Machine Learning is like teaching computers to learn from information and make
decisions or predictions without telling them exactly what to do.

2. Characteristics:
- Data-Driven: ML algorithms learn patterns and make decisions based on data, often large
datasets.
- Iterative Improvement: ML models improve their performance over time as they are exposed to
more data.
- Automation: ML automates tasks by finding patterns and making predictions or
recommendations.
- Scalability: ML can handle complex tasks, from image recognition to natural language processing
- Getting Better with Data: As they see more data, they get better at their jobs.
- Automated Help: Machines in Machine Learning can do tasks by themselves, like recognizing
pictures or making suggestions.
- Handling Complexity: They can handle tough tasks, like figuring out what's in a photo or
understanding human language.

3. Types of Machine Learning:


- Supervised Learning: Models learn from labeled data to make predictions or classifications.
- Unsupervised Learning: Models find patterns and structures in unlabeled data, like clustering or
dimensionality reduction.
- Reinforcement Learning: Agents learn by interacting with an environment and receiving rewards
or penalties.
- Deep Learning: A subset of ML, using artificial neural networks inspired by the human brain for
tasks like deep image and speech recognition.

4. Applications: Machine Learning is used in many areas, like medicine (finding diseases), finance
(detecting fraud), marketing (giving product recommendations), and making things like self-driving
cars and robots smarter.

Connection between Human Learning and Machine Learning:

1. Inspiration: Machine Learning often copies the way humans learn. For instance, neural networks
are like computer brains inspired by our own brains.
2. Data Annotation: Human experts often play a role in creating labeled datasets used for training
machine learning models.
3. Interpretability: Understanding how humans learn can aid in making machine learning models
more interpretable and trustworthy.
4. Feedback Loop: Machine learning can be used to enhance human learning experiences, such as
personalized education and e-learning platforms
5. Data Help: Humans help machines learn by giving them lots of labeled data (data with
explanations).
6. Making Sense: Understanding how humans learn can help us make machine learning better and
more understandable.
4. Helping Humans Learn: Machine learning can make learning easier for us, like personalized
learning in online courses.

So, in simple terms, human learning is how people learn naturally, while machine learning is teaching
computers to learn like humans but using lots of data and math. They can work together to make our
lives better and solve tricky problems.

2|Page
1.1.2 Types of Machine Learning
• Supervised Machine Learning
• Unsupervised Machine Learning
• Reinforcement Learning.

1. Supervised Machine Learning:


- Definition: Supervised Machine Learning is a type of ML where the computer is given a dataset
containing both input data and the corresponding correct output labels. The computer's job is to learn
a mapping or relationship between the input and output.
Or
- Definition: Supervised learning is the types of machine learning in which machines are
trained using well "labelled" training data, and on basis of that data, machines predict the
output.
- What it does: Think of it like teaching a computer to recognize things. You show it examples, like
pictures of cats and dogs, and tell it which is which.
- How it works: The computer learns by looking at lots of these examples and figuring out patterns. It
learns to tell cats from dogs based on what it's seen.
- Examples: It's used for things like making your email filter out spam or predicting tomorrow's
weather.
- Use Cases:
- Image Classification: Recognizing objects in images, like identifying cats or dogs.
- Spam Email Detection: Sorting emails into spam and non-spam categories.
- Predictive Analytics: Predicting stock prices, weather forecasts, or customer churn in businesses.

2. Unsupervised Machine Learning:


- Definition: Unsupervised Machine Learning involves the computer learning from data that doesn't
have labeled output. The goal here is to find hidden patterns, structures, or groupings within the data.
- What it does: Imagine you have a bunch of puzzle pieces but no picture. Unsupervised learning
helps the computer put together pieces that seem to fit.
- How it works: The computer groups similar things together, even if it doesn't know what they are. It
helps find hidden patterns in data.
- Examples: It's used for organizing customers by their shopping habits or spotting strange activity in
computer networks.
- Use Cases:
- Clustering: Grouping similar customers based on their purchasing behavior.
- Anomaly Detection: Identifying unusual patterns in network traffic for cybersecurity.
- Dimensionality Reduction: Reducing the complexity of data for visualization or analysis.

3|Page
3. Reinforcement Learning:
- Definition: Reinforcement Learning is a type of ML where the computer, known as an agent, learns
to make a sequence of decisions or take actions in an environment to maximize a cumulative reward.
- What it does: Think of it like training a dog. The computer learns to make a series of moves to get
the best treats (or rewards).
- How it works: The computer tries different actions and gets rewards or punishments. Over time, it
figures out the best actions to get the most rewards.
- Examples: It's used for making robots learn how to walk or teaching a computer to play chess really
well.

- Use Cases:
- Game Playing: Training agents to play games like chess, Go, or video games.
- Robotics: Teaching robots to perform tasks, like walking or picking up objects.
- Autonomous Driving: Developing self-driving cars that learn to navigate safely.

Each type of Machine Learning has its unique applications and methods. Supervised learning
is used for prediction and classification tasks, unsupervised learning for discovering hidden patterns,
and reinforcement learning for decision-making in dynamic environments. These types collectively
cover a wide range of problems and scenarios in the field of Machine Learning.

These are different ways computers learn, just like how people learn in different ways, like
studying, figuring things out on their own, or learning from rewards and punishments. These methods
help computers do all sorts of tasks, from recognizing pictures to making smart decisions.

4|Page
1.1.3 Applications of Machine Learning

Machine Learning is like giving computers the ability to learn and make smart decisions, just like
humans do. Here are some ways we use it:

1. Recommendations: You know how Netflix suggests movies you might like? That's Machine
Learning. It learns what you enjoy and suggests similar stuff.
2. Speech Recognition: When you talk to your phone or use voice assistants like Siri, they
understand your words because of Machine Learning.
3. Image Recognition: Machine Learning helps computers recognize what's in photos. It's why your
phone can sort pictures of cats and dogs.
4. Healthcare: It helps doctors predict diseases and choose the best treatments based on a patient's
data.
5. Finance: In the stock market, Machine Learning predicts which stocks might go up or down,
helping investors make smart decisions.
6. Self-Driving Cars: Machine Learning makes cars drive themselves by learning how to navigate
roads and avoid accidents.
7. Language Translation: Tools like Google Translate use Machine Learning to translate languages
accurately.
8. Fraud Detection: Banks use it to spot unusual transactions and prevent credit card fraud.
9. Customer Service: Chatbots that answer your questions on websites are powered by Machine
Learning.
10. Gaming: In video games, Machine Learning makes opponents smarter and adapts to your skills.
11. E-commerce: When you shop online, Machine Learning helps recommend products based on
your previous purchases and what others with similar interests bought.
12. Manufacturing: Factories use it to optimize production lines, predict equipment maintenance
needs, and ensure high-quality products.
13. Agriculture: Farmers use Machine Learning to monitor crop health, detect diseases in plants, and
manage their farms more efficiently.
14. Energy Efficiency: Machine Learning is used to control heating, ventilation, and air conditioning
systems in buildings to save energy and reduce costs.
15. Social Media: It helps social networks suggest friends, filter spam, and even understand your
interests to show you relevant content.
16. Natural Language Processing: This is used in chatbots, virtual assistants, and language
translation tools to make them understand and respond to human language.
17. Weather Forecasting: Machine Learning analyzes weather data to make more accurate weather
predictions, helping us prepare for storms and other weather events.
18. Content Recommendation: Streaming platforms like YouTube use it to recommend videos based
on your viewing history.

5|Page
19. Medical Diagnostics: Machine Learning assists in diagnosing diseases from medical images,
such as X-rays and MRIs, helping doctors make more accurate assessments.
20. Autonomous Robots: Robots in factories and warehouses use Machine Learning to navigate and
perform tasks without human guidance.
21. Text Sentiment Analysis: Businesses use it to analyze customer reviews and social media
comments to understand public opinion about their products or services.

So, Machine Learning is like a super-smart assistant that's everywhere, making our lives easier and
more efficient in various fields and industries. Machine Learning is like a helpful brain for computers,
allowing them to do all these cool things and more!

6|Page
1.1.4 Tools and Technology for Machine Learning
Machine Learning needs special tools and technology to work well. Here's how they help:

1. Python: It's like the main language that computers understand for Machine Learning. Think of it as
the language you use to talk to a computer and tell it what to do.

2. TensorFlow and PyTorch: These are like toolboxes for building and training Machine Learning
models. They help computers learn from data.

3. Scikit-Learn: It's a helper kit for Machine Learning in Python. It makes it easier to do things like
predicting or classifying.

4. Jupyter Notebook: It's like a digital notebook where you can write code, show data, and explain
what you're doing. It's helpful for sharing Machine Learning projects.

5. Keras: This is like a simple way to create Machine Learning models. It's great for beginners.

6. Big Data Tools: Sometimes, you need big computers to handle huge amounts of data. Tools like
Apache Spark help with that.

7. Cloud Services: Big companies like Amazon, Google, and Microsoft offer cloud services for
Machine Learning. It's like renting supercomputers to do your work.

8. GPU (Graphics Processing Unit): It's like a super-fast engine for Machine Learning. It makes
calculations lightning fast.

9. AutoML: This is like a shortcut for Machine Learning. It helps computers build models without
needing lots of human input.

So, these tools and tech are like the toolbox and language for Machine Learning. They help us teach
computers to learn and make smart decisions.

7|Page
Tools and Technologies for Machine Learning in simple terms and easy words:

Programming Languages (Python, R):


- These are like the languages we use to talk to computers. For Machine Learning, Python and R are
the most common ones. They help us write instructions for computers to learn from data.

Machine Learning Libraries and Frameworks (TensorFlow, PyTorch, Scikit-learn, Keras,


MXNet):
- Think of these like toolkits for building and training Machine Learning models. They provide ready-
to-use functions and make it easier to teach computers.

Data Visualization Tools (Matplotlib, Seaborn, Plotly):


- These tools help us create pictures and graphs to understand our data better. It's like drawing charts
to see patterns in your data.

Cloud-based Machine Learning Platforms (Google Cloud AI Platform, Amazon Web Services
(AWS), Microsoft Azure):
- Big companies offer these platforms where you can use powerful computers over the internet. It's
like renting a supercomputer to do your Machine Learning work without needing a supercomputer at
home.

Data Preprocessing Tools (Pandas, Numpy, SciPy):


- These are like helpers for getting data ready for Machine Learning. They help clean, organize, and
prepare the data for teaching computers.

AutoML (Automated Machine Learning) Platforms (Google AutoML, H20.ai):


- AutoML is like a shortcut for Machine Learning. These platforms help computers build models
without needing a lot of human input. It's like letting the computer do more of the work.

Model Deployment Tools (Kubernetes, Docker, Flask):


- Once you've trained a Machine Learning model, you need a way to use it. These tools help put the
model into action, like making it work on a website or an app.

So, these tools and technologies are like the tools in a toolbox for Machine Learning. They help us use
data to teach computers to make smart decisions and predictions.

8|Page
Unit-02 Python libraries suitable for Machine Learning
2.1 Numpy
NumPy is like a special toolbox that helps Machine Learning work better. It's like having a
set of tools to handle numbers and math easily.

Here's how it helps in simple words:

1. Math Superpowers: NumPy gives Machine Learning the power to do math really quickly.
Imagine you have lots of numbers, like grades in a class. NumPy helps you add, subtract, multiply,
and divide them super fast.
2. Working with Data: In Machine Learning, we have lots of data, like lists of numbers. NumPy
makes it easy to organize and work with this data. It's like putting your data in neat rows and columns
so the computer can understand it.
3. Efficiency: NumPy is like a speedy race car for numbers. It's designed to make Machine Learning
calculations happen in the blink of an eye. This is important because Machine Learning often deals
with massive amounts of data.
4. Arrays: In NumPy, we use something called arrays. Think of them like supercharged lists of
numbers. You can do all sorts of math and operations on these arrays, making Machine Learning
algorithms run smoothly.

So, NumPy is like the math wizard behind the scenes in Machine Learning, making all the number
crunching fast and efficient. It's a key tool for making computers smart!

❖ Creating Array: array()


creating an array with the `array()` function in NumPy in simple terms and easy words:

Imagine you have a bunch of numbers, like grades in a class. You want to organize these
numbers in a special way so a computer can understand and work with them easily. This is
where NumPy's `array()` function comes in.

Example in Simple Terms:

Let's say you have grades for a math test: 90, 85, 78, 92, and 88. To use them in a program,
you can create an array using `array()`. It's like putting these grades into a neat box:

Now, you have an array called `grades` that holds these numbers in a way that the computer
can easily do math with them. You can add, subtract, or do any math operation on these
grades conveniently.

In simple terms, NumPy's `array()` function is like putting your numbers into a special
container so the computer can handle them smoothly. It makes working with numbers in
programs much easier.

9|Page
❖ Accessing Array: by referring to its index number
Accessing an array by referring to its index number is like finding a specific item in a list:

- Array: Think of an array like a list of items. Each item has a position or index number.
- Index: An index is like the item's address in the list. It starts from 0 for the first item, 1 for
the second, and so on.
- Accessing: To access an item in the array, you tell the computer which index number to look
at. For example, if you have an array of fruits, `fruits`, `fruits[0]` would be the first fruit in the
list.
So, accessing an array by its index means you're telling the computer which item in the list
you want to work with, like finding the third fruit in a basket of fruits.

10 | P a g e
❖ Stacking & Splitting: stack(), array_split()

Stacking with stack():


• Stacking is like piling things on top of each other. In NumPy, stack() helps you
combine arrays vertically or horizontally.

• Vertical Stacking: If you have two sets of data, you can stack them on top of each
other, making one big stack.

• Horizontal Stacking: You can also place two sets of data side by side, creating a
wider set.

Example:-

11 | P a g e
Splitting with array_split():

• Splitting is like dividing a cake into pieces. array_split() in NumPy helps you divide
an array into smaller parts.

• You can specify how many parts you want and how to split them evenly or unevenly.
Example:-

12 | P a g e
❖ Maths Functions: add(), subtract(), multiply(), divide(), power(), mod()
Statistics Functions: amin(), amax(), mean(), median(), std(), var(), average(), ptp()
Certainly! Let's explain these math and statistics functions in simple terms:

Math Functions:
1. `add()`: It's like adding numbers together. For example, `add(5, 3)` would give you 8.
2. `subtract()`: It's like taking away one number from another. If you subtract 3 from 5, you
get 2.
3. `multiply()`: This is like repeated addition. If you multiply 5 by 3, it's the same as adding 5
three times, which gives you 15.
4. `divide()`: It's like splitting things into equal parts. If you have 10 candies and you divide
them among 2 friends, each gets 5 candies.
5. `power()`: It's like raising a number to a certain level of strength. If you have 2 to the
power of 3 (2^3), it's like saying 2 x 2 x 2, which equals 8.
6. `mod()`: This is like finding the remainder after division. If you divide 10 by 3, you get 3
with a remainder of 1. So, the modulus (mod) of 10 divided by 3 is 1.

Example:-

13 | P a g e
Statistics Functions:
1. `amin()`: It's like finding the smallest value in a group. If you have test scores, it tells you
the lowest score.
2. `amax()`: This is like finding the biggest value in a group. If you have test scores, it tells
you the highest score.
3. `mean()`: It's like finding the average. If you add up test scores and divide by the number
of tests, you get the mean, which is the typical score.
4. `median()`: It's like finding the middle value in a set of numbers when they're arranged in
order. If you have test scores, it tells you the score that's right in the middle.
5. `std()`: This measures how spread out or varied the numbers are. If test scores have a high
standard deviation, it means they vary a lot. If it's low, they are close together.
6. `var()`: It's like the average of how much each number is different from the mean. If the
variance is high, it means the numbers are spread out.
7. `average()`: It's similar to finding the mean; it's the weighted average of values. It's like
considering the importance or weight of each value when finding the average.
8. `ptp()`: This tells you the range, which is like the difference between the highest and
lowest values in a group.

These functions help us do various calculations and understand data in simple and useful
ways, like finding averages, extremes, and how spread out numbers are.

Example:-

14 | P a g e

You might also like