What Is Machine Learning And How Does It Work
Chapter 1- Basic Concept of Machine Learning (My Study Notes)
Last Update: 2018-11-20Description
This chapter briefly describes the main concepts of Machine Learning, including:
- what is Machine Learning
- what are Training data and Test data
- 3 main categories of Machine Learning: Supervised, unsupervised and reinforcement
What is Machine Learning?
Arthur Samuel's definition from 1959:
Machine Learning: Field of study that gives computers the ability to learn without being explicitly programmed. 
In traditional computing, programmers input commands to order computer to perform a specific action. Machine Learning is to input data instead.
Input Command vs Input Data
Command > Action
Data > Model > Action
The "Model" is important for Machine Learning, it requires testing data to verify the result, preventing making mistakes repeatedly.
For instance, the previous email filter frequently classifies payment notification emails as spam. It's because the email filter didn't have "Model" to test the result.
Training and Test Data
In machine learning, data is split into training data and test data.
Training data is the subset of the trained model. 
Test Data is the subset to test the trained model. 
Three main categories of Algorithms for Machine Learning:
1. Supervised Learning
2. Unsupervised Learning
3. Reinforcement Learning
It concentrates on learning patterns from labelled datasets and decoding the relationship between input features(independent variables) and their known output(dependent variable).
For instance: supply(x) affects the cost(y).
Feeding the sample data (x) and (y)
x=independent variable (input)
y=dependent variable (output)
The output needs to be inputted as well, because the machine needs to learn the relationship between x and y as a model.
After the machine interpreted the rules and patterns of the data, a model is created.
New data can be applied and test the accuracy once the model is developed.
Algorithms used for supervised learning:
1. Decision trees
2. Regression analysis
3. k-nearest neighbors
4. Neural networks
5. Support vector machines
The output variables are unlabelled.
It focuses on analysing relationships and revealing the patterns that can be extracted to create new labels regarding possible outputs.
The advantage of unsupervised learning
It enables you to find out patterns in the data that you were unaware existed.
Algorithms used for Unsupervised Learning
3. Bag of words (dictionary learning) 
4. Hierarchical clustering 
5. Competitive learning (SOM) 
This is a most advanced category of machine learning. It learns by interacting with its environment and observing the results of these interactions. 
It is very similar to human learning. When we take a new task that we don't have any experience, we initially try to find out possible solutions. After then, we try every possible solution randomly to see the result and score it. Eventually, we find a best solution to get the same task done in the future.
Algorithms used for Reinforcement Learning:
2. Machine-learning/Crash-Course/Training and Test-Sets/Splitting-data (developers.google.com)
3. Unsupervised learning (mit.edu)
4. Reinforcement Learning (cse.unsw.edu.au)