Humanity has entered the age of Artificial Intelligence (AI) and there is hardly any sector in life that has not felt its presence. With every moment, the relevance and applications of AI are shooting up, ranging from wine quality rating to discovering new antibiotics and powering autonomous cars, making it a must have skill of 21st century. In this series we will be concentrating on Machine Learning (ML) and applications of the same, with source codes, to intrigue the AI enthusiast in you.
Before diving deep into ML, it is beneficial to get familiar with the terms AI and ML.
AI is a blanket term relating to the development of computer systems capable of performing tasks that normally require Human level of intelligence. AI could be rule based or ML based. In rule based AI, the rules are provided explicitly in the program and the machine invariably follows these rules. Contrarily in ML, data is provided to programs and these programs access and use this data to learn the rules all by themselves without the rules being explicitly provided. Let’s look at an example:
We want to create a program that multiplies a number by 10. In traditional programming or in the rule based approach, the relationship y = 10x will be explicitly provided in the program, where y is the output and x the input. But in ML, the program will be provided with numerous instances of inputs and outputs, and the program tries to figure out the relationship between the input and the output. That is the program will be provided a dataset like the one given below.
Once the program has learned the relationship between the input
and output, then it is ready to be provided with inputs alone and
it will be able to predict the output. Thus it is clear that in ML
there is a learning part or training part for the program or model
as it is commonly called.
According to this learning mechanism, ML can be classified under Supervised Learning, Unsupervised Learning and Reinforcement Learning. In this part we will focus on Supervised Learning.
Supervised Machine Learning
In Supervised Machine Learning, the model tries to figure out the
relationship between the input and the output. The example, of the
multiplier, we have seen above comes under Supervised Learning.
This is just a rudimentary example to get you familiar with the
concept. The data being used changes with the problem that we are
trying to solve.
Supervised Learning can again be divided into Classification and Regression problems.
We will wind up this part learning more about Classification and
looking at the sample code to perform a Cat vs Dog classification.
Classification problems, as the name suggests, classifies a given set of data into classes. In the Cat Vs Dog classification problem, the input images will be classified into two classes: Cats and Dogs. These classes are also called as Labels, Targets, Output Classes or Categories. Some of the algorithms used in classification are:
- Logistic Regression
- Support Vector Machines
- K-nearest Neighbors (KNN)
- Support Vector Machines (SVM)
- Naïve Bayes
- Decision Tree Classification
- Random Forest Classification
- Artificial Neural Networks
Cat vs Dog classification is an example of binary classification, there are only two output classes. If the input data is to be classified into more that two classes, it is a multi-class classification problem. The input data of five different types of fruits being classified into these five categories is an example for multi-class classification.
Below is the link to the source code for Cat vs Dog classification using Convolutional Neural Network or CNN, which is a type of Artificial Neural Network.
In Part 2 we will go deeper into the Cat vs Dog classification and look at Regression with examples.
One Comment to “Fundamentals of Machine Learning: Part 1”
very nice… I really liked your blog on Fundamentals of Machine Learning: Part 1
Waiting for your next blog on Fundamentals of Machine Learning: Part 2