Machine Learning with Python_ Machine Learning Terminology
Machine Learning with Python_ Machine Learning Terminology
Home Python 2 Tutorial Python 3 Tutorial Advanced Topics Numerical Programming Machine Learning Tkinter Tutorial Contact
Classifier
Follow Bernd Klein,
A program or a function which maps from unlabeled instances to classes is the author of this
called a classifier. website, at Google+:
Bernd Klein on
Confusion Matrix Google
Bernd Klein on
A confusion matrix, also called a contingeny table or error matrix, is used to
Facebook
visualize the performance of a classifier.
The columns of the matrix represent the instances of the predicted classes and
the rows represent the instances of the actual class. (Note: It can be the other Search this website:
way around as well.)
Go
In the case of binary classification the table has 2 rows and 2 columns.
Example:
Classroom
Confusion Predicted classes
Training
Matrix Courses
male female
This website contains
a free and extensive
Actual male 42 8
online tutorial by
classes
Bernd Klein, using
female 18 32 material from his
classroom Python
This means that the classifier correctly predicted a male person in 42 cases and training courses.
Machine
it wrongly predicted 8 male instances as female. It correctly predicted 32
Learning instances as female. 18 cases had been wrongly predicted as male instead of If you are interested
female. in an instructor-led
Machine Learning classroom training
Terminology course, you may
k-nearest Accuracy (error rate) have a look at the
Neighbor Python classes
Accuracy is a statistical measure which is defined as the quotient of correct
Classifier
predictions made by a classifier divided by the sum of predictions made by the
Neural Networks classifier.
from Scratch in
Python The classifier in our previous example predicted correctly predicted 42 male
Neural Network instances and 32 female instance.
in Python using
Therefore, the accuracy can be calculated by: by Bernd Klein at
Numypy
Bodenseo. © kabliczech -
Backpropagation accuracy = (42 + 32)/(42 + 8 + 18 + 32) Fotolia.com
in Neural
Networks which is 0.72 Quote of the
Confusion Matrix Day:
Let's assume we have a classifier, which always predicts "female". We have an
Training and accuracy of 50 % in this case.
Testing with "If it's a good idea,
MNIST go ahead and do it. It
Confusion Predicted classes is much easier to
Dropout Neural Matrix apologize than it is to
Networks
male female get permission."
Neural Networks
(Grace Murray)
with Scikit Actual male 0 50
Machine Learning classes
with Scikit and If you have the
female 0 50
Python choice working with
Python 2 or Python 3,
Introduction
We will demonstrate the so-called accuracy paradox. we recomend to
Naive Bayes
switch to Python 3!
Classifier A spam recogition classifier is described by the following confusion matrix: You can read our
Naive Bayes Python Tutorial to see
Classifier with Confusion Predicted classes what the differences
Scikit Matrix are.
Introduction into spam ham
Text
Classification Actual spam 4 1 Data Protection
using Naive classes Declaration
Bayes ham 4 91
Python Data Protection
Declaration
Implementation The accuracy of this classifier is (4 + 91) / 100, i.e. 95 %.
of Text
Classification The following classifier predicts solely "ham" and has the same accuracy.
Decision Trees
Regression Trees Confusion Predicted classes
Random Forests Matrix
Boosting spam ham
Algorithm
Principal Actual spam 0 5
Component classes
Analysis ham 0 95
Linear
Discriminant The accuracy of this classifier is 95%, even though it is not capable of recognizing any spam at all.
Analysis
Expectation Precision and Recall
Maximization and
Gaussian Mixture Confusion Predicted classes
Model Matrix
Introduction into negative positive
TensorFlow
Actual negative TN FP
classes
positive FN TP
Accuracy: (T N + T P )/(T N + T P + F N + F P )
Precision: T P /(T P + F P )
This website is
created by:
Recall: T P /(T P + F N )
Supervised learning
The machine learning program is both given the input data and the corresponding labelling. This means that the learn data has to be labelled by a human being beforehand.
Unsupervised learning
No labels are provided to the learning algorithm. The algorithm has to figure out the a clustering of the input data.
Reinforcement learning
Python Training A computer program dynamically interacts with its environment. This means that the program receives positive and/or negative feedback to improve it performance.
Courses in Toronto,
Next Chapter: k-nearest Neighbor Classifier
Canada
On site trainings in
Europe, Canada and
the US.
© 2011 - 2018, Bernd Klein, Bodenseo; Design by Denise Mitchinson adapted for python-course.eu by Bernd Klein