Module 1#
Machine Learning#
- A scientific discipline that explores the construction and study of algos that can learn from data
- Such algos operate by building a model based on inputs and using that to make predictions or decisions rather than following only explicitly programmed instructions without human intervention
Traditional Programming VS Machine Learning#
We give the computer some data and a program and we expect an output from the same in the case of traditional programming
In case of ML we give the computer some training data and some expected output and we end up getting a procedure that solves the problem for new input data
Definition by Tom Mitchell (1998)#
A computer program is said to learn from experience \(E\) with respect to some class of tasks T and performance measure \(P\), if its performance at task in \(T\), as measured by \(P\), improves with experience \(E\)
Where does ML fit in?#
Steps of ML#
- Define Business Problem
- Gathering Data
- Prepare said data (Takes most of the time, around 80%)
- Choosing a model
- Training
- Evaluation
- Hyperparameter Tuning
- Prediction
Types of Learning#
- Supervised/Inductive Learning
- Unsupervised Learning
- Semi-supervised Learning
- Reinforcement Learning
Supervised Learning#
This learning type uses data that is labeled. Data that have categorized data into columns are considered labeled data.
In the above image we are trying to predict a genralized function \(f(x)\) that will predict the potential value of y given a new value of x.
Regression#
\(y = Output\)
\(f() = Prediction Function\)
\(x_1, x_2,.., x_n = Features Used\)
Training: Given a training set of labeled examples, estimate the prediction function f by minimizing the prediction error on the training set
Testing: Apply f to a never before seen test example x and output the predicted value y f(x)
Classification#
Unsupervised Learning#
Unsupervised learning helps in getting to know not so obvious attributes that categorize data sets into smaller groups in case of clustering
Reinforcement Learning#
- No pre-defined data
- Semi supervised learning model in ML
- Allow an agent to take actions and interact with an environment so as to maximize the total rewards
- Examples
- Autonomous Cars
- Game playing
- Robot in a maze
Difference between the three types of learning#
Other Categories of Learning#
- In batch learning there is a potential for relearning when an updation is needed. It is used ideally done once before deployment
- In case of changing data sets we use online/incremental learning
- Instance based learning: also called as lazy learning. Learning techniques do not build a model but stores all training instance in memory and when they undergo classification they use proximity measures k closely related members to categorize them.
- Model Based learning where we detect patterns in the training data and build a predictive model
Challenges of machine learning#
Testing and Validation#
Cross Validation#
Choice of Hyperparameters#
- Modern ML modesl often use a lot of model params
- Model performance depends on chouce of params
- Each parm can assume a number of values
- Expensive to perform
- Grid Search CV method
Open Source ML Programming Tools#
Tags: !AMLIndex