Photo by Alexandr Popadin on Unsplash
Notes on Machine Learning
My personal notes on the field of machine learning.
This article started as a Google Doc of my notes while learning Machine Learning. At some point, I turned the document into a blog post that others may benefit from, hence this article.
I am still learning, so these notes continuously change. As they do, I will update this article. Therefore, these notes are not authoritative and are likely to be wrong. Feel free to email me with corrections.
Machine Learning
The study and development of algorithms that enable computers to make decisions without being explicitly programmed on how to arrive at that conclusion.
Instead, algorithms are shown sample data from which they "learn" to make better decisions.
Some tasks are feasible for a programmer to tell a computer how to calculate or decide. For example, it is almost trivial to build a program to calculate time given distance and speed.
def calculate_speed(distance, speed):
return distance / speed
Other programs such as accounting systems may be complex, but still possible to build within a reasonable timeframe.
However, some tasks are impractical or impossible for the programmer to tell a computer how to do them. This might be because the logic required to perform such tasks is not well-understood. For example, identifying objects in an image.
But we know these tasks can be done because we(humans) always do them. This is after learning from many training examples. So, with Machine Learning, we show algorithms loads of training examples from which they will be able to learn.
Machine Learning is a crucial part of Artificial Intelligence. Artificial Intelligence studies and develops computer systems that mimic and exhibit human intelligence. Learning is one part of intelligent behaviour, so Machine Learning is one part of Artificial Intelligence.
Terminology
There are some important keywords used in Machine Learning.
Types of Learning
Supervised Learning
The algorithm will have data to learn from, which will be labelled.
The objective of the algorithm is to make predictions on which label the data belongs to
Unsupervised learning
The algorithm will have data but not be labelled.
The objective of the algorithm is to group similar data.
Reinforcement Learning
An algorithm that tries things
And is penalised when the outcome is bad
And rewarded when the outcome is good.
Over time, it tries to maximise the good outcome.
Evolution
Types of Data
Structured Data
In table format
.csv, etc
Unstructured Data
- Audio, Images, Video
Supervised Machine Learning Objectives
Regression
- Estimating a continuous value (infinite set of outcomes)
Classification
- Putting a value into a class (a finite set of outcomes)
Deep Learning
Use neural networks to achieve any of the machine learning objectives(regression, classification)
Types of neural networks: Standard Neural Network, Convolutional Neural Network, Recurrent Neural Network etc
Non-Deep Learning
Several Machine Learning Algorithms that do not use neural network
Algorithms include K Nearest Neighbours, Naive Bayes, Linear Regression
K Nearest Neighbours
Is a classification algorithm, meaning that given a set of features, it tries to find a label that best describes that feature from a set of discrete labels.
To predict the label of any point (x, y), the algorithm finds k neighbours closest to point (x, y).
Distance is calculated as Euclidean distance.
It then counts the number of points in the k nearest points that belong to each possible label.
The algorithm then predicts the label with the highest number of points in k points.
Does the (number of points / k) become its confidence?
The Mathematics Involved in Machine Learning
You do not need Math for Machine Learning in the same way that you do not need to understand Binary or Assembly to code.
But understanding the math behind machine learning helps you see how these algorithms work under the hood and how it all comes together.
The Math involved is Linear Algebra, Calculus(Multivariate), Probability and Statistics