0% found this document useful (0 votes)
15 views11 pages

ML UNIT 1 Notes

The document provides comprehensive notes on Machine Learning (ML) for a BCA course, covering its definition, types, applications, challenges, and the importance of Python in ML. It details supervised, unsupervised, and reinforcement learning, along with various ML applications such as image recognition, speech recognition, and healthcare. Additionally, it discusses essential libraries like Scikit-learn, NumPy, and Pandas, and highlights the differences between supervised and unsupervised learning.

Uploaded by

ahmedfaraz1102
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)
15 views11 pages

ML UNIT 1 Notes

The document provides comprehensive notes on Machine Learning (ML) for a BCA course, covering its definition, types, applications, challenges, and the importance of Python in ML. It details supervised, unsupervised, and reinforcement learning, along with various ML applications such as image recognition, speech recognition, and healthcare. Additionally, it discusses essential libraries like Scikit-learn, NumPy, and Pandas, and highlights the differences between supervised and unsupervised learning.

Uploaded by

ahmedfaraz1102
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/ 11

VASAVI JNANA PEETHA FIRST GRADE COLLEGE

MACHINE LEARNING NOTES


VI SEM BCA
Unit-1 INTRODUCTION OF ML

1)What is ML?
 Machine learning is a subfield of artificial intelligence (AI)
 ML is a “Field of study that gives computers the capability to learn
without being explicitly programmed”
Ex: Speech & Image Recognition, Chatbot, Traffic alerts using Google Map,
Google Translation etc

2)Why use ML?


i)Prediction and Forecasting:
 ML models can analyze historical data to predict future outcomes or
trends.
 This is useful in finance, weather forecasting, stock market analysis, and
more.
ii)Improved Decision Making:
ML algorithms analyze vast amounts of data to provide insights and predictions,
facilitating better decision-making processes across industries like finance,
healthcare, marketing, and more.
iii)Real-time Data Analysis:
ML facilitates real-time analysis of streaming data, enabling quick decision-
making in dynamic environments such as financial trading, IoT applications,
and monitoring systems.
iv)Pattern Recognition:
 ML excels in recognizing patterns within data that might be too complex
or numerous for humans to discern.
 This capability is valuable in image and speech recognition, medical
diagnostics, and fraud detection.
v)Automation and Optimization:
 ML can automate repetitive tasks, making processes more efficient.
 For instance, in manufacturing, it can optimize production schedules or
detect faults in machinery.
vi)Personalization:
 Many online services use ML. to personalize user experiences.
 For example, recommendation systems on streaming platforms or
e-commerce sites suggest content or products based on user behavior.
Yogesha S N(B.Sc B.ed,MCA,M.Sc in Mathematics)
H.O.D of BCA
Vasavi Jnana Peetha First Grade College Page 1
vii)Efficient Resource Utilization:
ML helps optimize resource allocation and utilization by analyzing patterns and
trends, leading to more efficient processes in manufacturing, supply chain
management, and energy consumption.
viii)Natural Language Processing (NLP):
 ML allows computers to understand, interpret, and generate human
language.
 This is used in chatbots, language translation, sentiment analysis, and
more.
ix)Healthcare and Medicine: ML is used in medical imaging analysis, drug
discovery, personalized medicine, and predicting disease outbreaks, improving
diagnostics, treatment plans, and patient care.

3)Explain different types of ML?


 Machine learning is a subfield of artificial intelligence (AI) .
 ML is a “Field of study that gives computers the capability to learn
without being explicitly programmed”
Ex: Speech & Image Recognition, Chatbot, Traffic alerts using Google Map,
Google Translation etc

There are three types


i)Supervised Machine Learning
ii)Unsupervised Machine Learning
iii)Reinforcement Learning
i)supervised Machine learning:-
•Supervised learning algorithms are trained using labelled data.
•Supervised learning model takes direct feedback to check if it is predicting
correct output or not.
Examples: Text categorization. Face Detection. Signature recognition.
There are two types
Yogesha S N(B.Sc B.ed,MCA,M.Sc in Mathematics)
H.O.D of BCA
Vasavi Jnana Peetha First Grade College Page 2
a)classification b)Regression
a) classification:- Classification techniques is a predict discrete responses.
For example medical imaging, speech recognition, and credit scoring.
b)Regression:- Regression techniques is a predict continuous responses.
for example, changes in temperature or fluctuations in electricity demand.

ii)Unsupervised Machine learning:-


•Unsupervised learning algorithms are trained using unlabelled data.
•Unsupervised learning model does not take any feedback.
Examples: Text Mining,Face Recognition, Image recognition etc
There are two types
a)clustering b)Association
a)clustering:- Clustering is the process of grouping data points into clusters
based on their similarity. This technique is useful for identifying patterns and
relationships in data without the need for labelled examples.
Most common clustering algorithms:
 K-Means Clustering algorithm
 Mean-shift algorithm
 DBSCAN Algorithm
 Principal Component Analysis
 Independent Component Analysis

b)Association:- Association rule learning is a technique for discovering


relationships between items in a dataset. It identifies rules that indicate the
presence of one item implies the presence of another item with a specific
probability.
Most common association rule learning algorithms:
 Apriori Algorithm
 Eclat
 FP-growth Algorithm

iii)Reinforcements learning :-
Reinforcement learning is a machine learning training method based on
rewarding desired behaviors and/or punishing undesired ones.
Examples:Gaming,Finance sector,manufacturing,Robot Navigation etc
most common reinforcement learning algorithms
 Q-learning
 SARSA (State-Action-Reward-State-Action)
 Deep Q-learning

Yogesha S N(B.Sc B.ed,MCA,M.Sc in Mathematics)


H.O.D of BCA
Vasavi Jnana Peetha First Grade College Page 3
4)Explain applications of ML?

1. Image Recognition:
 Image recognition is one of the most common applications of machine
learning.
 It is used to identify objects, persons, places, digital images, etc.
 The popular use case of image recognition and face detection
is, Automatic friend tagging suggestion
2. Speech Recognition
 While using Google, we get an option of "Search by voice," it comes
under speech recognition, and it's a popular application of machine
learning.
 Speech recognition is a process of converting voice instructions into text,
and it is also known as "Speech to text", or "Computer speech
recognition."
 Google assistant, Siri, Cortana, and Alexa are using speech recognition
technology to follow the voice instructions.
3. Traffic prediction:
 If we want to visit a new place, we take help of Google Maps, which
shows us the correct path with the shortest route and predicts the traffic
conditions.
 It predicts the traffic conditions such as whether traffic is cleared, slow-
moving, or heavily congested with the help of two ways:
4. Product recommendations:
 Machine learning is widely used by various e-commerce companies such
as Amazon, Flipkart etc., for product recommendation to the user.

Yogesha S N(B.Sc B.ed,MCA,M.Sc in Mathematics)


H.O.D of BCA
Vasavi Jnana Peetha First Grade College Page 4
 Whenever we search for some product on Amazon, then we started
getting an advertisement for the same product while internet surfing on
the same browser and this is because of machine learning.
5. Self-driving cars:
 One of the most exciting applications of machine learning is self-driving
cars. Machine learning plays a significant role in self-driving cars.
 Tesla, the most popular car manufacturing company is working on self-
driving car.
6. Email Spam and Malware Filtering:
 Whenever we receive a new email, it is filtered automatically as
important, normal, and spam.
 We always receive an important mail in our inbox with the important
symbol and spam emails in our spam box, and the technology behind this
is Machine learning.
7. Virtual Personal Assistant:
 We have various virtual personal assistants such as Google
assistant, Alexa, Cortana, Siri.
 As the name suggests, they help us in finding the information using our
voice instruction.
 These assistants can help us in various ways just by our voice instructions
such as Play music, call someone, Open an email, Scheduling an
appointment, etc.
8. Online Fraud Detection:
 Machine learning is making our online transaction safe and secure by
detecting fraud transaction.
 It is used to detect fake accounts, fake ids, and steal money
9. Medical Diagnosis:
 In medical science, machine learning is used for diseases diagnoses.
 With this, medical technology is growing very fast and able to build 3D
models that can predict the exact position of lesions in the brain.
 It helps in finding brain tumors and other brain-related diseases easily.
10. Automatic Language Translation:
 Nowadays, if we visit a new place and we are not aware of the language
then it is not a problem at all,
 as for this also machine learning helps us by converting the text into our
known languages.
11.Markating:
 It is used to more effective marketing strategies.
 It allows marketers to make key decisions based on big data.
Yogesha S N(B.Sc B.ed,MCA,M.Sc in Mathematics)
H.O.D of BCA
Vasavi Jnana Peetha First Grade College Page 5
 ML can analyse vast amount of data considerably faster and more
effectively than humans.

5)Explain main challenges of ML?


i)Poor quality of data:-
 Data plays a significant role in machine learning, and it must be of good
quality as well. Noisy data, incomplete data, inaccurate data, and unclean
data lead to less accuracy in classification and low-quality results.
 Hence, data quality can also be considered as a major common problem
while processing machine learning algorithms.
ii)Overfitting:-
Overfitting is one of the most common issues faced by Machine Learning
engineers and data scientists. Whenever a machine learning model is trained
with a huge amount of data, it starts capturing noise and inaccurate data into the
training data set. It negatively affects the performance of the model.
Methods to reduce overfitting:
o Increase training data in a dataset.
o Reduce model complexity by simplifying the model by selecting one with
fewer parameters
o Ridge Regularization and Lasso Regularization
o Early stopping during the training phase
o Reduce the noise
o Reduce the number of attributes in training data.
o Constraining the model.
iii)Underfitting:
Underfitting is just the opposite of overfitting. Whenever a machine learning
model is trained with fewer amounts of data, and as a result, it provides
incomplete and inaccurate data and destroys the accuracy of the machine
learning model.
Methods to reduce Underfitting:
o Increase model complexity
o Remove noise from the data
o Trained on increased and better features
o Reduce the constraints
o Increase the number of epochs to get better results.
iv)Monitoring and maintenance:
As we know that generalized output data is mandatory for any machine learning
model; hence, regular monitoring and maintenance become compulsory for the
same. Different results for different actions require data change; hence editing
of codes as well as resources for monitoring them also become necessary.
Yogesha S N(B.Sc B.ed,MCA,M.Sc in Mathematics)
H.O.D of BCA
Vasavi Jnana Peetha First Grade College Page 6
v)Lack of Explainability:
 This basically means the outputs cannot be easily comprehended as it is
programmed in specific ways to deliver for certain conditions.
 Hence, a lack of explainability is also found in machine learning
algorithms which reduce the credibility of the algorithms.
vi)Slow implementations and results:
 This issue is also very commonly seen in machine learning models.
 However, machine learning models are highly efficient in producing
accurate results but are time-consuming.
 Slow programming, excessive requirements' and overloaded data take
more time to provide accurate results than expected.
 This needs continuous maintenance and monitoring of the model for
delivering accurate results.

6)Why python?
 Python is a powerful open source,high level,interpreter,object oriented
programming language.
 Python created by Guido van Rossum in 1991.
Python is important due to
i)Python is easy to understand:
Python is the most suitable programming language for this because it is easy to
understand and you can read it for yourself.
ii) Python comes with a large number of libraries:
Many of these inbuilt libraries are for Machine Learning and Artificial
Intelligence, and can easily be applied out of the box.
Some of the libraries are:
 scikit-learn for data mining, analysis, and Machine Learning.
 Tensorflow, a high-level neural network library.
 Pandas, a powerful and versatile library that simplifies the tasks of data
manipulation in Python.
iii) Python allows easy and powerful implementation:
 Machine Learning is its easy and powerful implementation.
 With other programming languages, coding beginners or students need to
familiarize themselves with the language first before being able to use it
for ML or AI.
 It will spend less time writing code and debugging errors on Python than
on Java or C++.

Yogesha S N(B.Sc B.ed,MCA,M.Sc in Mathematics)


H.O.D of BCA
Vasavi Jnana Peetha First Grade College Page 7
iv)Friendly syntax and human-level readability:
 Python is an object-oriented programming language that uses modern
scripting and friendly syntax.
 Designed with an almost human-level readability, the scripting nature of
Python enables coders and programmers to test their hypothesis and run
their algorithms very fast.
.v) Community:
Lastly, Python provides broad support. Because a lot of people, both
programmers and average users, view Python as a standard, its support
community is huge, increasing Python’s popularity even more.

7)Explain scikit-learn?
Definition:
Scikit-learn (Sklearn) is the most useful and robust library for machine learning
in Python. It provides a selection of efficient tools for machine learning and
statistical modelling including classification, regression, clustering and
dimensionality reduction via a consistence interface in Python. This library,
which is largely written in Python, is built upon NumPy, SciPy and Matplotlib.

Installing scikit-learn on windows


If you already installed NumPy and Scipy, the following are the two easiest
ways to install scikit-learn
Using pip
The following command can be used to install sci-kit-learn via pip
pip install scikit-learn
To verify your installation, you can use the following commands:
python -m pip show scikit-learn

8)Explain essential liabraries and tools?


Python libraries are reusable code modules that contain pre-written code. You
can integrate it into your code to save time and effort.
i)Numpy:-
NumPy stands for numeric python ,which is a python package for the
computation and processing of the multidimensional and single dimensional
array elements,mathematical operations,linear algebra.
Installation
Pip install numpy

Yogesha S N(B.Sc B.ed,MCA,M.Sc in Mathematics)


H.O.D of BCA
Vasavi Jnana Peetha First Grade College Page 8
ii)Pandas:-
 Pandas is a powerful and versatile library that simplifies the tasks of
data manipulation in Python.
 Pandas is well-suited for working with tabular data, such
as spreadsheets or SQL tables.
 The Pandas library is an essential tool for data analysts, scientists, and
engineers working with structured data in Python.
Installation
Pip install pandas
iii)Matplotlib:-
 matplotlib matplotlib is the primary scientific plotting library in Python.
 It provides functions for making publication-quality visualizations such
as line charts, histograms, scatter plots, and so on.
Installation
Pip install matplotlib
iv)Scipy:-
 SciPy is a Python library useful for solving many mathematical
equations and algorithms.
 it is a collection of functions for scientific computing in Python.
 It provides, among other functionality, advanced linear algebra routines,
mathematical function optimization, signal processing, special
mathematical functions, and statistical distributions.
Installation
Pip install scipy
v)Jupyter Notebook:-
 The Jupyter Notebook is an interactive environment for running code in
the browser.
 It is a great tool for exploratory data analysis and is widely used by data
scientists.
 While the Jupyter Notebook supports many programming languages, we
only need the Python support.
Installation
Python –m Pip install jupyter

Yogesha S N(B.Sc B.ed,MCA,M.Sc in Mathematics)


H.O.D of BCA
Vasavi Jnana Peetha First Grade College Page 9
9)Differences between supervised and unsupervised Machine Learning
Supervised Learning Unsupervised Learning

Supervised learning algorithms are trained using Unsupervised learning algorithms are trained
labeled data. using unlabeled data.

Supervised learning model takes direct feedback to Unsupervised learning model does not take
check if it is predicting correct output or not. any feedback.

Supervised learning model predicts the output. Unsupervised learning model finds the hidden
patterns in data.

In supervised learning, input data is provided to the In unsupervised learning, only input data is
model along with the output. provided to the model.

The goal of supervised learning is to train the model so The goal of unsupervised learning is to find
that it can predict the output when it is given new data. the hidden patterns and useful insights from
the unknown dataset.

Supervised learning needs supervision to train the Unsupervised learning does not need any
model. supervision to train the model.

Supervised learning can be categorized Unsupervised Learning can be classified


in Classification and Regression problems. in Clustering and Associations problems.

Supervised learning can be used for those cases where Unsupervised learning can be used for those
we know the input as well as corresponding outputs. cases where we have only input data and no
corresponding output data.

Supervised learning model produces an accurate result. Unsupervised learning model may give less
accurate result as compared to supervised
learning.

Supervised learning is not close to true Artificial Unsupervised learning is more close to the
intelligence as in this, we first train the model for each true Artificial Intelligence as it learns
data, and then only it can predict the correct output. similarly as a child learns daily routine things
by his experiences.

It includes various algorithms such as Linear It includes various algorithms such as


Regression, Logistic Regression, Support Vector Clustering, KNN, and Apriori algorithm.
Machine, Multi-class Classification, Decision tree,
Bayesian Logic, etc.
10)How machine learning works?
Machine Learning enables computers to learn from data and make predictions
or decisions without explicit programming.

Yogesha S N(B.Sc B.ed,MCA,M.Sc in Mathematics)


H.O.D of BCA
Vasavi Jnana Peetha First Grade College Page 10
The process involves several key steps:
Data Collection:
 The first step in Machine Learning is gathering relevant data representing
the problem or task at hand.
 This data can be collected from various sources such as databases,
sensors, or online platforms.
Data Preprocessing:
 Once the data is collected, it needs to be pre-processed to ensure its
quality and suitability for training the model.
 This involves cleaning the data, handling missing values, and normalizing
or transforming the data to a consistent format.
Feature Extraction and Selection:
 The collected data may contain many features or attributes in many cases.
Feature extraction and selection involve identifying the most informative
and relevant features contributing to the learning task.
 This helps reduce the data's dimensionality and improves the learning
process's efficiency and effectiveness.
Model Training:
 The training phase involves feeding the pre-processed data into a
Machine Learning algorithm or model.
 The model learns from the data by adjusting its internal parameters based
on the patterns and relationships it discovers.
Model Evaluation:
 The model must be evaluated to assess its performance and generalization
ability after training it.
 This is typically done using a separate data set called the test set, which
was not used during training.
Prediction or Decision Making:
 Once the model is trained and evaluated, it can predict or decide on
new, unseen data.
 The model takes input features and applies the learned patterns to
generate the desired output or prediction.
Model Refinement and Iteration:
 ML is an iterative process that involves refining the model based on their
feedback and new dataset.
 If the model's performance is unsatisfactory and not accurate, then we can
make adjustments by retraining the model with additional data, changing
the algorithm, or tuning the model's parameters.

Yogesha S N(B.Sc B.ed,MCA,M.Sc in Mathematics)


H.O.D of BCA
Vasavi Jnana Peetha First Grade College Page 11

You might also like