Python Machine Learning
A Step by Step Beginners Guide to Learn Machine Learning Using Python
Brady Ellison
Copyright 2021 - All rights reserved.
The content contained within this book may not be reproduced, duplicated or transmitted without direct written permission from the author or the publisher.
Under no circumstances will any blame or legal responsibility be held against the publisher, or author, for any damages, reparation, or monetary loss due to the information contained within this book, either directly or indirectly.
Legal Notice:
This book is copyright protected. It is only for personal use. You cannot amend, distribute, sell, use, quote or paraphrase any part, or the content within this book, without the consent of the author or publisher.
Disclaimer Notice:
Please note the information contained within this document is for educational and entertainment purposes only. All effort has been executed to present accurate, up to date, reliable, complete information. No warranties of any kind are declared or implied. Readers acknowledge that the author is not engaged in the rendering of legal, financial, medical or professional advice. The content within this book has been derived from various sources. Please consult a licensed professional before attempting any techniques outlined in this book.
By reading this document, the reader agrees that under no circumstances is the author responsible for any losses, direct or indirect, that are incurred as a result of the use of the information contained within this document, including, but not limited to, errors, omissions, or inaccuracies.
Table of Contents
Introduction
About this Book
Note on Code and Datasets
Requirements
Chapter 1: Understanding Machine Learning
What is Machine Learning?
Supervised Learning
Semi-Supervised Learning
Unsupervised Learning
Reinforcement Learning
Challenges
Bad Data
Missing Data
Chapter 2: Getting Started with Python
Machine Learning with Python
Python Installation Guide
Installing Python Scientific Distributions
Anaconda
ActivePython
Canopy
WinPython
CPython
Python Machine Learning Packages and Tools
Scikit-learn
NumPy
SciPy
Matplotlib
Pandas
Jupyter Notebooks
TensorFlow
Working in Virtual Environments
Datasets
Your First Machine Learning Model
The Iris Dataset
The Train/Test Split
Data Assessment
Machine Learning with k-Nearest Neighbors
Machine Learning Model Evaluation
Chapter 3: Supervised Machine Learning
Classification and Regression Types
Overfitting, Underfitting, and Generalization
Amount of Data vs. Model Complexity
Supervised Learning Algorithms
Datasets, Datasets, Datasets
Assignment
K-Nearest Neighbors Classification
Linear Regression Models
Linear Regression (The Classic)
Assignment
Ridge Regression
Assignment
Linear Classification Models
Assignment
Notes on Linear Model Parameters
The Naive Bayes Classifiers
Notes on Naive Bayes Parameters
Assignment
Decision Trees
Pruning
Creating Decision Trees
Assignment
Note on Creating your own Features
Automatic Creation
Chapter 4: Unsupervised Machine Learning
Unsupervised Learning Categories
The Challenge
Transformations
Principal Component Analysis
PCA Application
K-Means Clustering
Chapter 5:
Neural Networks Theory and Deep Learning
The Concept of Neural Networks
Basic Neural Network Architecture
Feed-Forward Neural Networks
Gaining a Deeper Understanding
Backpropagation
Neural Networks and Overfitting
Recurrent Neural Networks
The Restricted Boltzmann Machine
Chapter 6:
Give Your Machine Learning Models a Boost
Learning Curves
Cross-Validation
Finding the Best Hyper-Parameters
Finding the Best Error Metric
Working with Multiple Models
Model Averaging
Model Stacking
Feature Engineering
Feature Selection
More Data
FAQ
Conclusion
Other Books from the Author
Introduction
Nowadays, machine learning has a few different meanings, especially due to misunderstandings caused by the entertainment industry. People use too much of their imagination thinking that machine learning involves machines that take over the world due to their ability to think beyond the capability of a human using powerful algorithms. Naturally, the real world is disappointing when compared to such a vivid imagination, but that doesnt change the fact that machine learning is still an incredible tool that takes our technology to the next level.
That being said, machine learning may not have anything to do with intelligent robots, but you can perform some practical feats using various techniques and algorithms. Python Machine Learning provides you with a fundamental view of this field, handing you all the tools you need to perform amazing things. Despite some of the exercises and concepts feeling boring and mundane, once you learn them, youll realize that they will enable you to build useful applications that can help people and society as a whole. So, enter the ever-expanding world of machine learning with the help of this step-by-step guide!
About this Book
The main goal of this book is to teach you how machine learning can be used in the real world and what it can do for you if you invest enough time and practice into it. Take note that you dont need a degree in computer science, mathematics, or be a data scientist to understand the concepts and techniques used in this book. In fact, all you really need is a bit of Python programming knowledge and some mathematics. Anyone can learn this. Youre going to learn a lot of machine learning theory, but you will also go through a number of practical demonstrations that will show you how to work with data and how to obtain results from it.
In this book, a good deal of the focus goes on working with the right tools. Youre going to use Python as the programming language of choice, however, the theory you learn can also be applied using R if at some point in the future you want to try something new. However, the emphasis is on Python when learning machine learning concepts because Python comes with a rich selection of free libraries, packages, and other tools that make the implementation of machine algorithms much easier.
In addition, you will explore some of the most important concepts and techniques in machine learning. Youll learn a series and algorithms, see how they work, and find ways to improve them for better results. The main advantage of using this book is that all of these concepts can be learned with a limited knowledge of math, but its still recommended for you to focus on the math side as well, especially if you want to progress.
Machine learning is complex, there are a lot of tools involved, but Python Machine Learning will guide you every step of the way and get you started as soon as possible by working with real-world datasets and tools.
Note on Code and Datasets