Download Supervised Learning with Python Concepts and Practical Implementation Using Python 1st Edition Vaibhav Verdhan ebook All Chapters PDF
Download Supervised Learning with Python Concepts and Practical Implementation Using Python 1st Edition Vaibhav Verdhan ebook All Chapters PDF
com
https://textbookfull.com/product/supervised-learning-with-
python-concepts-and-practical-implementation-using-
python-1st-edition-vaibhav-verdhan/
OR CLICK BUTTON
DOWNLOAD NOW
https://textbookfull.com/product/supervised-learning-with-python-
concepts-and-practical-implementation-using-python-1st-edition-
vaibhav-verdhan/
textboxfull.com
https://textbookfull.com/product/practical-machine-learning-for-data-
analysis-using-python-1st-edition-abdulhamit-subasi/
textboxfull.com
https://textbookfull.com/product/advanced-data-analytics-using-python-
with-machine-learning-deep-learning-and-nlp-examples-mukhopadhyay/
textboxfull.com
https://textbookfull.com/product/practical-python-data-visualization-
a-fast-track-approach-to-learning-data-visualization-with-python-
ashwin-pajankar/
textboxfull.com
https://textbookfull.com/product/reinforcement-learning-with-open-ai-
tensorflow-and-keras-using-python-1st-edition-abhishek-nandy/
textboxfull.com
https://textbookfull.com/product/deep-learning-with-python-develop-
deep-learning-models-on-theano-and-tensorflow-using-keras-jason-
brownlee/
textboxfull.com
Vaibhav Verdhan
Apress Standard
The publisher, the authors and the editors are safe to assume that the
advice and information in this book are believed to be true and
accurate at the date of publication. Neither the publisher nor the
authors or the editors give a warranty, expressed or implied, with
respect to the material contained herein or for any errors or omissions
that may have been made. The publisher remains neutral with regard
to jurisdictional claims in published maps and institutional affiliations.
—Vaibhav Verdhan
Limerick,
Ireland. June 2020
Acknowledgments
I would like to thank Apress publications, Celestin John, Shrikant
Vishwarkarma, and Irfan Elahi for the confidence shown and the
support extended. Many thanks to Dr. Eli Kling for the fantastic forward
to the book. Special words for my family—Yashi, Pakhi, and Rudra—
without their support it would have been impossible to complete this
work.
Table of Contents
Chapter 1:Introduction to Supervised Learning
What Is ML?
Relationship Between Data Analysis, Data Mining, ML, and
AI
Data, Data Types, and Data Sources
How ML Differs from Software Engineering
ML Projects
Statistical and Mathematical Concepts for ML
Supervised Learning Algorithms
Regression vs.Classification Problems
Steps in a Supervised Learning Algorithm
Unsupervised Learning Algorithms
Cluster Analysis
PCA
Semi-supervised Learning Algorithms
Technical Stack
ML’s Popularity
Use Cases of ML
Summary
Chapter 2:Supervised Learning for Regression Analysis
Technical Toolkit Required
Regression analysis and Use Cases
What Is Linear Regression
Assumptions of Linear Regression
Measuring the Efficacy of Regression Problem
Example 1:Creating a Simple Linear Regression
Example 2:Simple Linear Regression for Housing Dataset
Example 3:Multiple Linear Regression for Housing Dataset
Nonlinear Regression Analysis
Identifying a Nonlinear Relationship
Assumptions for a Nonlinear Regression
Challenges with a Regression Model
Tree-Based Methods for Regression
Case study:Petrol consumption using Decision tree
Ensemble Methods for Regression
Case study:Petrol consumption using Random Forest
Feature Selection Using Tree-Based Methods
Summary
Chapter 3:Supervised Learning for Classification Problems
Technical Toolkit Required
Hypothesis Testing and p-Value
Classification Algorithms
Logistic Regression for Classification
Assessing the Accuracy of the Solution
Case Study:Credit Risk
Additional Notes
Naïve Bayes for Classification
Case Study:Income Prediction on Census Data
k-Nearest Neighbors for Classification
Case Study:k-Nearest Neighbor
The Dataset
Business Objective
Tree-Based Algorithms for Classification
Types of Decision Tree Algorithms
Summary
Chapter 4:Advanced Algorithms for Supervised Learning
Technical Toolkit Required
Boosting Algorithms
Using Gradient Boosting Algorithm
SVM
SVM in 2-D Space
KSVM
Case Study Using SVM
Supervised Algorithms for Unstructured Data
Text Data
Use Cases of Text Data
Challenges with Text Data
Text Analytics Modeling Process
Text Data Extraction and Management
Preprocessing of Text Data
Extracting Features from Text Data
Case study:Customer complaints analysis using NLP
Word Embeddings
Case study:Customer complaints analysis using word
embeddings
Image Data
Use Cases of Image Data
Challenges with Image Data
Image Data Management Process
Image Data Modeling Process
Fundamentals of Deep Learning
Artificial Neural Networks
Activation Functions
Loss Function in a Neural Network
Optimization in a Neural Network
Neural Network Training Process
Case Study 1:Create a Classification Model on Structured Data
Case Study 2:Image Classification Model
Summary
Chapter 5:End-to-End Model Development
Technical Toolkit Required
ML Model Development
Step 1:Define the Business Problem
Step 2:Data Discovery Phase
Step 3:Data Cleaning and Preparation
Duplicates in the Dataset
Categorical Variable Treatment in Dataset
Missing Values Present in the Dataset
Imbalance in the Dataset
Outliers in the Dataset
Other Common Problems in the Dataset
Step 4:EDA
Step 5:ML Model Building
Train/Test Split of Data
Finding the Best Threshold for Classification Algorithms
Overfitting vs.Underfitting Problem
Key Stakeholder Discussion and Iterations
Presenting the Final Model
Step 6:Deployment of the Model
Step 7:Documentation
Step 8:Model Refresh and Maintenance
Summary
Index
About the Author
Vaibhav Verdhan
has 12+ years of experience in data
science, machine learning, and artificial
intelligence. An MBA with engineering
background, he is a hands-on technical
expert with acumen to assimilate and
analyze data. He has led multiple
engagements in ML and AI across
geographies and across retail, telecom,
manufacturing, energy, and utilities
domains. Currently he resides in Ireland
with his family and is working as a
Principal Data Scientist.
About the Technical Reviewer
Irfan Elahi
is a full stack customer-focused cloud
analytics specialist bearing the unique
and proven combination of diverse
consulting and technical competencies
(cloud, big data, and machine learning)
with a growing portfolio of successful
projects delivering substantial impact
and value in multiple capacities across
telecom, retail, energy, and health-care
sectors. Additionally, he is an analytics
evangelist as is evident from the
published book, Udemy courses,
blogposts, trainings, lectures, and
presentations with global reach.
© Vaibhav Verdhan 2020
V. Verdhan, Supervised Learning with Python
https://doi.org/10.1007/978-1-4842-6156-9_1
What Is ML?
When we post a picture on Facebook or shop at Amazon, tweet or
watch videos on YouTube, each of these platforms is collecting data for
us. At each of these interactions, we are leaving behind our digital
footprints. These data points generated are collected and analyzed, and
ML allows these giants to make logical recommendations to us. Based
on the genre of videos we like, Netflix/YouTube can update our playlist,
what links we can click, and status we can react to; Facebook can
recommend posts to us, observing what type of product we frequently
purchase; and Amazon can suggest our next purchase as per our pocket
size! Amazing, right?
The short definition for ML is as follows: “In Machine Learning, we
study statistical/mathematical algorithms to learn the patterns from
the data which are then used to make predictions for the future.”
And ML is not limited to the online mediums alone. Its power has
been extended to multiple domains, geographies, and use cases. We
will be describing those use cases in detail in the last section of this
chapter.
So, in ML, we analyze vast amounts of data and uncover the
patterns in it. These patterns are then applied on real-world data to
make predictions for the future. This real-world data is unseen, and the
predictions will help businesses shape their respective strategies. We
do not need to explicitly program computers to do these tasks; rather,
the algorithms take the decisions based on historical data and
statistical models.
But how does ML fit into the larger data analysis landscape? Often,
we encounter terms like data analysis, data mining, ML, and artificial
intelligence (AI). Data science is also a loosely used phrase with no
exact definition available. It will be a good idea if these terms are
explored now.
Figure 1-3 Data quality plays a vital role in development of an ML solution; a lot of
time and effort are invested in improving data quality
ML Projects
An ML project is like any other project. It has a business objective to be
achieved, some input information, tools and teams, desired accuracy
levels, and a deadline!
However, execution of an ML project is quite different. The very
first step in the ML process is the same, which is defining a business
objective and a measurable parameter for measuring the success
criteria. Figure 1-5 shows subsequent steps in an ML project.
Figure 1-5 An ML project is like any other project, with various steps and process.
Proper planning and execution are required for an ML project like any other project.
5. After modeling, results are shared with the business team and the
statistical model is deployed into the production environment.
Since most of the data available is seldom clean, more than 60%–
70% of the project time is spent in data mining, data discovery,
cleaning, and data preparation phase.
Before starting the project, there are some anticipated challenges.
In Figure 1-6, we discuss a few questions we should ask before starting
an ML project.
Figure 1-6 Preparations to be made before starting an ML project. It is imperative
that all the relevant questions are clear and KPIs are frozen.
We should be able to answer these questions about the data
availability, data quality, data preparation, ML model prediction
measurements, and so on. It is imperative to find the answers to these
questions before kicking off the project; else we are risking stress for
ourselves and missing deadlines at a later stage.
Now you know what is ML and the various phases in an ML project.
It will be useful for you to envisage an ML model and what the various
steps are in the process. Before going deeper, it is imperative that we
brush up on some statistical and mathematical concepts. You will also
agree that statistical and mathematical knowledge is required for you
to appreciate ML.
BATTLE of BAROSA
5th March, 1811.
London Published by T. & W. Boone Novr 1830.
On the French side, Cassagne’s reserve came in from Medina, a
council of war was held in the night of the 5th, and Victor, although of
a disponding nature, proposed another attack; but the suggestion
being ill received, nothing was done; and the 6th, Admiral Keats,
landing his seamen and marines, dismantled, with exception of
Catalina, every fort from Rota to Santa Maria, and even obtained
momentary possession of the latter place. Confusion and alarm then
prevailed in the French camp; the duke of Belluno, leaving garrisons
at the great points of his lines, and a rear guard at Official Abstracts of
Chiclana, retreated behind the San Pedro, where he Military
MSS.
Reports,
S K I R M I S H AT P O M B A L .
Pack’s brigade and the cavalry, the first, third, fourth, fifth, sixth,
and light divisions, and the Portuguese troops, which were attached,
like the ancient Latin auxiliaries of the Roman legion, to each British
division, were assembling in front of the enemy on the 10th; when
Massena, who had sent his baggage over the Soure river in the night
by the bridge of Pombal, suddenly retired through that town. He was
so closely followed by the light division, that the streets being still
encumbered, Ney drew up a rear-guard on a height behind the town,
and threw a detachment into the old castle of Pombal. He had,
however, waited too long. The French army was moving in some
confusion and in a very extended column of march, by a narrow
defile, between the mountains and the Soure river, which was
fordable; and the British divisions were in rapid motion along the left
bank, with the design of crossing lower down, and cutting Massena’s
line of retreat. But darkness came on too fast, and the operation
terminated with a sharp skirmish at Pombal, whence the ninety-fifth
and the third caçadores of the light division, after some changes of
fortune, drove the French from the castle and town with such vigour,
that the latter could not destroy the bridge, although it was mined.
About forty of the allies were hurt, and the loss of the enemy was
somewhat greater.
In the night Massena continued his retreat, which now assumed a
regular and concentrated form. The baggage and sick, protected by
the reserve cavalry, marched first; these were followed by the eighth
corps; and the sixth, with some light cavalry, and the best horsed of
the artillery, were destined to stem the pursuit. Ney had been
ordered to detach Marcognet’s brigade on the 10th, from the Lys, to
seize Coimbra; but some delay having taken place, Montbrun was
now appointed for that service.
Lord Wellington’s immediate object was to save Coimbra, and he
designed, by skilful, rather than daring, operations, to oblige
Massena to quit the Portuguese territory: the moral effect of such an
event, he judged, would be sufficient; but as his reinforcements were
still distant, he was obliged to retain the fourth division and the heavy
cavalry from the relief of Badajos, and was therefore willing to strike
a sudden stroke, if a fair occasion offered. Howbeit the country was
full of strong positions, the roads hollow and confined by mountains
on either hand, every village formed a defile; the weather also, being
moderate, was favourable to the enemy, and Ney, with a wonderfully
happy mixture of courage, readiness, and skill, illustrated every
league of ground by some signal combination of war.
Day-break, on the 12th, saw both armies in movement, and eight
miles of march, and some slight skirmishing, brought the head of the
British into a hollow way, leading to a high table-land on which Ney
had disposed five thousand infantry, a few squadrons of cavalry, and
some light guns. His centre was opposite the hollow road, his wings
were covered by wooded heights, which he occupied with light
troops; his right rested on the ravine of the Soure, his left on the
Redinha, which circling round his rear fell into the Soure. Behind him
the village of Redinha, situated in a hollow, covered a narrow bridge
and a long and dangerous defile; and, beyond the stream, some very
rugged heights, commanding a view of the position in front of the
village, were occupied by a division of infantry, a regiment of cavalry,
and a battery of heavy guns; all so skilfully disposed as to give the
appearance of a very considerable force.
C O M B AT O F R E D I N H A .
C O M B AT O F C A S A L N O VA .
C O M B AT O F F O Z D ’ A R O N C E .
The 15th, the weather was so obscure that the allies could not
reach the Ceira, before four o’clock in the evening, and the troops,
as they came up, proceeded to kindle fires for the night; thinking that
Ney’s position being strong, nothing would be done. The French right
rested on some thickly wooded and rugged ground, and their left
upon the village of Foz d’Aronce, but lord Wellington, having cast a
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
textbookfull.com