Skip to main content

Introduction to Machine Learning

Hello all, welcome to the practical machine learning hub. Here you will be learning some of the projects on machine learning and  deep learning. But in this post let us know what exactly is machine learning and types of machine learning.


What is Machine Learning?

According to Arthur Samuel, Machine Learning is the field of study that gives computers the ability to learn without being explicitly being programmed.

According to Tom Mitchell, A computer program is said to learn from experience E with respect to some task T and some performance measure P, if its performance on T, as measured by P, improves with experience E.

For example in Spam emails,

The task T is  classifying emails.
The experience E is labeling emails as spam or not spam.
The performance P is how correctly it classified as spam or not spam    

See the source image

In traditional programming, you give data and program(logic) as input and the model gives output. For example, you have given X=2 and Y=2*X as input to model and it gives output as Y=4. 

But in machine learning,  if you give X=[1,2,3,4] for Y=[2,4,6,8]  i.e for X=1,Y=2 , for X=2,Y=4, for X=3,Y=6 and similarly for X=4,Y=8 (this is in the form of Y=2*X).Now when you want to know the value of Y, when X=6, then machine learning will predict the pattern in the data given(X,Y) and gives output as Y=12(approx.) 

Types of Machine Learning

There are mainly 3 types of Machine Learning.
  1. Supervised Learning
  2. Unsupervised Learning
  3. Reinforcement Learning

Supervised Learning:

In supervised learning, the training data you feed to the algorithm includes the desired solutions, called labels. A typical supervised learning task is classification. The spam filter is a good example of this: it is trained with many example emails along with their class (spam or ham), and it must learn how to classify new emails.

 

Another typical task is to predict a target numeric value, such as the price of a car, given a set of features (mileage, age, brand, etc.) called predictors. This sort of task is called regression. To train the system, you need to give it many examples of cars, including both their predictors and their labels (i.e., their prices).

Here are some of the most important supervised learning algorithms :
 • k-Nearest Neighbors 
• Linear Regression 
• Logistic Regression
• Support Vector Machines (SVMs) 
• Decision Trees and Random Forests 
• Neural networks

Unsupervised Learning:

In unsupervised learning, as you might guess, the training data is unlabeled. The system tries to learn without a teacher


Here are some of the most important unsupervised learning algorithms :
 • Clustering
    — K-Means
    — DBSCAN 
    — Hierarchical Cluster Analysis (HCA) 
• Anomaly detection and novelty detection 
    — One-class SVM 
    — Isolation Forest 
• Visualization and dimensionality reduction 
    — Principal Component Analysis (PCA) 
    — Kernel PCA
    — Locally-Linear Embedding (LLE) 
    — t-distributed Stochastic Neighbor Embedding (t-SNE)

Reinforcement Learning:

Reinforcement Learning is a very different beast. The learning system, called an agent in this context, can observe the environment, select and perform actions, and get rewards in return (or penalties in the form of negative rewards). It must then learn by itself what is the best strategy, called a policy, to get the most reward over time. A policy defines what action the agent should choose when it is in a given situation. 


There is also another type of machine learning named Semi-Supervised Learning

Semi-supervised Learning:

Some algorithms can deal with partially labeled training data, usually a lot of unlabeled data and a little bit of labeled data. This is called semi-supervised learning.
Some photo-hosting services, such as Google Photos, are good examples of this. Once you upload all your family photos to the service, it automatically recognizes that the same person A shows up in photos 1, 5, and 11, while another person B shows up in photos 2, 5, and 7. This is the unsupervised part of the algorithm (clustering). Now all the system needs is for you to tell it who these people are. Just one label per person, and it is able to name everyone in every photo, which is useful for searching photos. 

That's all for this post. Hope you got some information from this post. In the next post we will learn about Deep learning and what is the main difference between Machine Learning and Deep Learning. Thank you!

Contacts:

ph.No: +91 9182530027
gmail: hunnurjirao2000@gmail.com
github: github.com/hunnurjirao


Comments

Popular posts from this blog

Introduction to Deep Learning

Hello guys, today we will learn what is deep learning and difference between Machine Learning and Deep Learning and also a small introduction about Neural Networks. What is Deep Learning? Deep learning is a type of  machine learning  (ML) and  artificial intelligence  (AI) that imitates the way humans gain certain types of knowledge. Deep learning is an important element of data science, which includes statistics and predictive modeling.   Difference between ML and DL In machine learning, first we should extract features from input and then fed to the model. But when comes to Deep learning there will be no need of feature extraction. There is one of the most important algorithms called Neural Networks which we will discuss in this post. Lets discuss some more concept about the difference between ML and DL. Before that lets know about different types of data. There are two types of data  Structured Data - Price of house, user ID etc.   Unstructured Data - Images, audio, text, etc. Now,

Generating Fake Faces

Hello guys, welcome to this new project of Generating Fake Faces. There is a wonderful concept called GANs (Generative Adversarial Network) which generates fake images. You can generate any thing you want. If you have person's faces dataset, you can generate fake faces of persons. If you have Pokémon's dataset, you can generate new Pokémon that never exists on the Earth. GANs were invented by Ian Goodfellow in 2014 and first described in paper Generative Adversarial Nets . If you have zero knowledge about GANs don't worry about it, you will learn how it works here and by the end of the post you will be able to generate whatever you want (only if you have a good and huge dataset!!!). One last thing I want to inform you is that this project is done using PyTorch . You can find the full code here . You can find more fake persons that doesn't exist on the earth  here , once go through it.  OK guys lets start our project. Generative Adversarial Networks Generative Adversari

Hand Signs Using KNN

Hello guys, welcome to this new project named "Hand Signs using KNN". There are different types of Hand Signs, but here we use only hand signs of  Zero, One, Two, Three, Four & Five. But wait.! we are not using any Deep Learning or Neural Networks in this project. Instead we are using KNN a.k.a K-Nearest Neighbor which is one the Machine Learning Algorithms. We will talk about this later in this post. But how can we give directly images as input to the model, if we use a Machine Learning algorithm? Don't worry about it there are two files (train.h5, test.h5) that consists of features of the images (here features is nothing but pixel values of the image). You can find these files and also full code  here . Hand Signs Now lets talk about K Nearest Neighbor. K Nearest Neighbor(A Supervised Learning Algorithm) Introduction KNN algorithm is the laziest algorithm , we can also say KNN as instance based learning. It is called as the laziest algorithm because   it does nothin

A Convolution Neural Network Application

Hello guys, welcome to this new project. In this project you will learn about Convolutional Neural Networks and the project is to Detect You whenever you are in-front of your laptop. One thing I want to conform before starting our project, this project is totally different from face detection. I will discuss about face detection in another session. And guys don't worry about code. 'Why worry, when we have Google's Tensorflow!'.You can find the code here , have a look. OK guys lets start our project.  Convolution Neural Network Convolution Neural Network(CNN) Why CNNs? Let us start the session from this question - Why CNNs? We have DNN(Deep Neural Networks) which performs well on images but why CNNs? To know the reason, let us assume we have an RGB image of shape (64,64,3). This has 12288 (64*64*3) number of pixels (It is also called as 12288 Dimensional feature vector).It is not too bad! But as technology increased we can find images of (1000,1000,3) that has nearly 3 M

MNIST Handwritten Digits Recognition

Hello guys, in this post we will learn about MNITS(Modified National Institute of Standards and Technology) Hand written digits recognition. Here we will be creating a Deep Neural Network model that recognizes the hand written digits. MNIST is nothing but a dataset that contains 60000 training images and 10000 testing images of hand written digits and these are actually gray scale images. You can find full code  here   The below are the sample images of MNIST dataset. Now lets dive into code!!! Setup First we will import some necessary modules like numpy and keras. Numpy is used to perform algebric or numerical operations and Keras is a deep learning API written in Python, running on top of the machine learning platform Tensorflow(Tensorflow is an end-to-end, open-source machine learning platform.) import numpy as np from tensorflow import keras from tensorflow.keras import layers Load the dataset Now lets load the MNIST dataset. (x_train, y_train), (x_test, y_test) = keras.datasets.mn