Book Image

Machine Learning with Python

By : Oliver Theobald
Book Image

Machine Learning with Python

By: Oliver Theobald

Overview of this book

The course starts by setting the foundation with an introduction to machine learning, Python, and essential libraries, ensuring you grasp the basics before diving deeper. It then progresses through exploratory data analysis, data scrubbing, and pre-model algorithms, equipping you with the skills to understand and prepare your data for modeling. The journey continues with detailed walkthroughs on creating, evaluating, and optimizing machine learning models, covering key algorithms such as linear and logistic regression, support vector machines, k-nearest neighbors, and tree-based methods. Each section is designed to build upon the previous, reinforcing learning and application of concepts. Wrapping up, the course introduces the next steps, including an introduction to Python for newcomers, ensuring a comprehensive understanding of machine learning applications.
Table of Contents (18 chapters)
Free Chapter
1
FOREWORD
2
DATASETS USED IN THIS BOOK
3
INTRODUCTION
4
DEVELOPMENT ENVIRONMENT
5
MACHINE LEARNING LIBRARIES
6
EXPLORATORY DATA ANALYSIS
7
DATA SCRUBBING
8
PRE-MODEL ALGORITHMS
9
SPLIT VALIDATION
10
MODEL DESIGN
11
LINEAR REGRESSION
12
LOGISTIC REGRESSION
13
SUPPORT VECTOR MACHINES
14
k-NEAREST NEIGHBORS
15
TREE-BASED METHODS
16
NEXT STEPS
APPENDIX 1: INTRODUCTION TO PYTHON
APPENDIX 2: PRINT COLUMNS

SUPPORT VECTOR MACHINES

 

In this chapter, we discuss a relatively new regression analysis technique called support vector machines, or SVM for short. SVM is considered one of the best classifiers in supervised learning for analyzing complex data and downplaying the influence of outliers.

Developed within the computer science community in the 1990s, SVM was initially designed for predicting numeric and categorical outcomes as a double-barrel prediction technique. Today, SVM is mostly used as a classification technique for predicting categorical outcomes—similar to logistic regression.

 

A diagram of a line graph  Description automatically generated

Figure 27: Logistic regression versus SVM

 

In binary prediction scenarios, SVM mirrors logistic regression as it attempts to separate classes based on the mathematical relationship between variables. Unlike logistic regression, however, SVM attempts to separate data classes from a position of maximum distance between itself and the partitioned data points. Its key feature...