Building
Machine Learning
Systems Using
Python
Practice to Train Predictive
Models and Analyze Machine Learning
Results with Real Use-Cases
Deepti Chopra
www.bpbonline.com
FIRST EDITION 2021
Copyright BPB Publications, India
ISBN: 978-93-89423-617
All Rights Reserved. No part of this publication may be reproduced, distributed or transmitted in any form or by any means or stored in a database or retrieval system, without the prior written permission of the publisher with the exception to the program listings which may be entered, stored and executed in a computer system, but they can not be reproduced by the means of publication, photocopy, recording, or by any electronic and mechanical means.
LIMITS OF LIABILITY AND DISCLAIMER OF WARRANTY
The information contained in this book is true to correct and the best of authors and publishers knowledge. The author has made every effort to ensure the accuracy of these publications, but publisher cannot be held responsible for any loss or damage arising from any information in this book.
All trademarks referred to in the book are acknowledged as properties of their respective owners but BPB Publications cannot guarantee the accuracy of this information.
Distributors:
BPB PUBLICATIONS
20, Ansari Road, Darya Ganj
New Delhi-110002
Ph: 23254990/23254991
MICRO MEDIA
Shop No. 5, Mahendra Chambers,
DN Rd. Next to Capital Cinema,
V.T. (C.S.T.) Station, MUMBAI-400
Ph: 22078296/22078297
DECCAN AGENCIES
4-3-329, Bank Street,
Hyderabad-500195
Ph: 24756967/24756400
BPB BOOK CENTRE
Old Lajpat Rai Market,
Delhi-110006
Ph: 23861747
Published by Manish Jain for BPB Publications, Ansari Road, Darya Ganj, New Delhi-110002 and Printed by him at Repro India Ltd, Mumbai
www.bpbonline.com
Dedicated to
My Family and Friends
Who are always with me to love, support and care.
About the Author
Dr. Deepti Chopra is working as Assistant Professor (IT) at Lal Bahadur Shastri Institute of Management, Delhi. She has around years of teaching experience. Her area of interest includes Natural Language Processing, Computational Linguistics and Artificial Intelligence. She is author of books and has written several research papers in various International Conferences and Journals.
About the Reviewer
Anmol has years of experience in the software industry. He has honed his skills in Machine Learning, Deep Learning, build and maintain ETL/ELT data pipelines and data-driven systems. Some of the industries Anmol has worked in are Airline, E-Commerce, Human Resource and HealthCare. His everyday work involves analysing and solving complex business problems, breaking down the work into feasible actionable tasks, and collaborating with his team and project manager to plan and communicate delivery commitments to our business clients.
When he is not working, Anmol spends most of his time reading, traveling the world, playing Fifa and catching his favourite Broadway shows. An admitted sports fanatic, he feeds his addiction to football by watching Real Madrid games on Sunday afternoons.
Acknowledgement
I want to thank God most of all, because without God I wouldnt be able to do any of this.
I acknowledge with gratitude and sincerely thank all my family and friends for the blessings and good wishes conveyed to me to achieve the goal to publish this machine learning based book.
My sincere thanks are due to few friends/TR of this book who encourages and motivate me every time and proves that they are always here for me. Such relations are the perfect example of Quality over Quantity.
This book wouldnt have happened if I hadnt had the support from content editor of BPB Publications. My gratitude goes to the editorial and publishing professionals of BPB Publications for their keen interest and support in bringing out this book.
Finally, I would like to thank Mr. Manish Jain at BPB Publications for giving me this opportunity to write my first book for them.
Preface
With the increase in availability of data from different sources, there is a growing need of data driven fields such as analytics and machine learning. This book intends to cover basic concepts of machine learning, various learning paradigms and different architectures and algorithms used in these paradigms.
This book is meant for the beginners who want to get knowledge about machine learning in detail. This book can also be used by machine learning users for a quick reference for fundamentals in machine learning.
Following are the chapters covered in this book:
Chapter 1: Introduction to Machine Learning
Description: This chapter covers basic concepts of machine learning, areas in which ML is performed, input-output functions
Topics to be covered:
What is machine learning?
Utility of ML
Applications of ML
Chapter 2: Linear Regression
Description: This chapter discusses about Linear Regression
Topics to be covered: List of topics covered in this chapter are:
Linear Regression in one variable
Linear Regression in multiple variables
Gradient descent
Polynomial Regression
Chapter 3: Classification using Logistic Regression
Description: This chapter discusses about classification using Logistic Regression
Topics to be covered: List of topics covered in this book are:
Binary Classification
Logistic Regression
Multi class Classification
Chapter 4: Overfitting and Regularization
Description: This chapter discusses about overfitting and regularization
Topics to be covered: List of topics covered in this chapter are:
Overfitting and regularization in linear regression
Overfitting and regularization in logistic regression
Chapter 5: Feasibility of Learning
Description: This chapter discusses about feasibility of learning
Topics to be covered: Topics covered in this chapter are:
Feasibility of learning an unknown target function
In-sample error
Out-of-sample error
Chapter 6: Support Vector Machine
Description: This chapter discusses about Support Vector Machine
Topics to be covered: Please provide the list of topics to be covered through the book:
Introduction