A blog for computer science passionates.

Sunday, 8 July 2018

Hi Friends,


Welcome again,

Today We are going to learn about Regression. We have already learn a brief about regression. But now, we take deep dive into the regression. It is a very broad thing in ML.

So, let's start with regression.
Regression is a type of supervised learning, so it has input variable as well as output variable like classification, but regression works for statistical analysis on data. or we can say it is a statistical process  to estimate real values, such  as, prices of different cars.

Lets take an example of regression:

import csv
import numpy
import matplotlib.pyplot as plt
from matplotlib import style
style.use("ggplot")
from sklearn import svm
file_name="regression_ex.csv"
raw_data=open(file_name,"rt")
reader=csv.reader(raw_data,delimiter=',',quoting=csv.QUOTE_NONE)
x=list(reader)
data=numpy.array(x)
plt.scatter(data[1:,0],data[1:,1])

Output:
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAX0AAAD8CAYAAACb4nSYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAGmVJREFUeJzt3XuUHGWZx/Hv5AJILiBkdiMXBdagJgFDgGTxQoAFFkQSUHwkBiEiYlR0jcCedQVWx4ML7GLQlUUwBy8sIA8oJEdAcBeIihIJhFuCgc2AiCFLQhRCgMBkZv+o6kmn05Ou7q6u6ar39zknJ9PV1f28b8/0M3XpqV9HX18fIiIShiGDPQAREcmOmr6ISEDU9EVEAqKmLyISEDV9EZGAqOmLiARETV9EJCBq+iIiAVHTFxEJyLDBHkAV+hNhEZHGdNRaoR2bPqtWrWr4sWPGjGHt2rUpjqZ96mluqtdutYpeL09z22233RKtp8M7IiIBUdMXEQmImr6ISEDU9EVEAqKmLyISkESf3jGzY4BvAUOB+e5+0QDrnQTcCBzs7kvMbC/gcWBFvMp97j6n6VGLiEhDajZ9MxsKXA4cBTwL3G9mC919ecV6o4AvAIsrnmKlu09Kabwi0iZ616yGBdeybsN6ekeMghmzGNI5drCHJTUk2dKfAvyvu3cD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GtgT6Cbla4HFvege4B4zexT4HLDM3Q8Z4CFpvveA/G3pn0S0e/c2d9/L3fcEniL6jT8lPuQxhOi3fr2HcpLWAhhvZtvHu59/Fy/7PbBP/IMPm7c86mZmncB3ge+4ex9RPvFn4q0mzGxfMxtBtLt4enwck/iHvlED1YB0X9udgOfjhn848LYmnqsef6D69y2Pda4Gutz90YrlO7H5JOvsNqg5H/g2cH+9W8nx+k502LHkN2z+QMUs4p/DeAv6d8C3gJ/VuZH3P8COZnYq9J/bupRoz+ROYE7p5HfZ+2s9MKqe+cSPf4eZjStbNAl4HOiMT/JiZsPNrHwP7aPx8vcRHX59sd66lfLW9GcSBbCX+wnRR6B+S3Qi8jGi5ly5Xpq1HHiE6LjiUoD4hONngZ+b2a+B/yM6yZRU6Tj7MqLDHncSnUSC6M2zHHgw3o2+Ehjm7j8n2spZEu8aNnKMuKRqjfi+qq+tmc03s0RbcPEbZyPRa3aQmS0heuPWPJFpZnPMbE5909myrrv/kSrft7RkVQfA3Z91929VuesSoi3ee4n2TLc13oe2dX8aNd39AeAltr21vi2XAuWf4vkC8In40ODHgX8ou+8G4BTqO7RDvFF1IvARM3sSeILovNM/E70nngEeMbOHid77EJ1ovt3M7q5zPiOBH5rZ8ngO44nOg5wEXBzXeIjogwwlfzaz3xBtBH6y8gkbUYi/yK38xMQgjmOku78cn5i8HHjS3ecN5pjahZm9G/ieu08pYt3Bml87M7PdiA5lvLPRT3uFzFL6+5FKedvSb3efireglhHt9l5ZY/0gxFvp1xOdpCpc3cGaXzuLD5csBr6iht9eCrGlLyIiyWhLX0QkIGr6IiIBUdMXEQmImr6ISEDU9EVEAqKmLyISkP8HtkOF8rWBZjMAAAAASUVORK5CYII=
Figure: Regression of Month wise Heatwave


So, This is a simple example of regression. in next article, we will learn different types of regression.

Wednesday, 28 March 2018

Hello Friends,
In the previous article, we have discussed supervised learning algorithms and even we have seen a simple classification example in python, but now in this article, we are going to take deep dive into Classification, algorithm,
Actually, in the Supervised Learning algorithm, there is a data-set and from that data-set, we want to learn to classify. Now say, for example, I have some data of students and if I made a survey about how many students want to learn computer programming, so for us, those students who want to learn computer programming are positive examples, and others are negative examples. We find a class of students who want to learn computer programming so, we should consider positive examples only for that we need to make a prediction based on knowledge extraction.

In classification sometimes we have either true/false or Yes / No or Male / Female type of data, i.e. in our above example, students who want to learn computer programming is a positive example, so those who want to learn computer programming says YES. So,

This type of Classification is known as binary classification. and is used to classify two classes on the basis of a classification rule.

Other types of classifications are
  • Multi-Class Classification
  • Multi-Label Classification
Sometimes, these both becomes ambiguous,  So, let's differentiate these both,

Multi-Class Vs. Multi-Label Classification,

Here, let's take an example, Consider the word Animal, in which we have Multiple - Classes such as,
There are Birds, Mammals, etc. And Birds class has lots of different types of Birds such as parrot, peacock,  sparrow, etc. Here, parrot, pea-cock are different labels.
Fig. 1 Multi-Class Classification(Image Source: pixabay)

In the above pic, you can see three different classes, and with different animals, you can classify these classes with different labels of animals such as class wild - animal has tiger, monkey, etc. labels.

So, this is Classification and it's type. In the next post, we will see regression.
Enjoy with Machine Learning.

Monday, 5 March 2018

Hello Friends,

In this article, we are going to learn about Supervised Learning in detail. In previous article we discussed about all the types of learning in brief. From which we learn more about Supervised Learning. So, Let's take a tour to Supervised Learning.

Supervised Learning is most popular and successful learning algorithm. In supervised learning, there is a teacher to train set of data. i.e. the set of data learns under supervision of an instructor or teacher. we all know about supervised learning, it is something like humans learning methods. In supervised learning, there is input as well as output data. such as, X is my input data, Y becomes output data.something like,
Y=f(X)

Here, we have input data X, it is training data. so, here we have a teacher who give training to our input data X, and X make a prediction and it is corrected by the teacher and represent some output Y. This algorithm is known as Supervised Learning. In this algorithm we try to make accurate prediction to generate unseen or new data that has never seen before.

We have two types of Supervised Machine Learning algorithms,
  • Classification
  • Regression
In classification, we predict a different class and give some label to that class.For example, if we have different flowers, we classify this data in different other class based on its' different types and smell and look such as,Rose, Water lily, Sun - Flower, Jasmine, Orchid etc. we just classify different flowers as per their category.
Let's take demo example of classification.
First of all I have this sample data set.
Figure1. Data Set
I have this .csv file as my data set. I put some flower name and set it's color and width and height.
Figure2. Classification using Flower name and It's Color.

In this example, I classify flower through their color.

In regression,  we have some real values related data, i.e. Monthly - Income, or Predicting a price of a car or home etc, and we get the output in real values, we predict based on real values is regression.

This is supervised learning, hope you get supervised learning easily,
In next article I will discuss more interesting things related to Machine Learning, till then Enjoy...

Tuesday, 27 February 2018

Hello Friends,

In this article We are going to learn about different types of Machine Learning. Actually types are in the form of algorithms. So, Lets' start different types of Machine Learning.
  • Supervised Learning
  • Un-supervised Learning
  • Semi supervised Learning
  • Reinforcement Learning
These are the types of Machine Learning. Lets' start with some brief.

First of all we are going through,

Supervised Learning: 

  • Supervised learning means machine needs to learn under supervision, i.e., there is a teacher to teach machine.
  • Supervised learning is an learning algorithm, for labeled data.
  • In supervised learning, we have trained data which consists of input object as well as desired output value.

Unsupervised Learning:

  • Unsupervised learning means machine learns without teacher, i.e. without any supervision.
  • In unsupervised learning there is only input data, there is no output.
  • In unsupervised learning there is only input data, and asked to extract knowledge from this data.

Semi supervised Learning:

  • Semi supervised learning is a part of supervised learning, and works between supervised and unsupervised learning.
  • When we have large amount of unlabeled data, from which this algorithm makes use of those unlabeled data to train small amount of labeled data.

Reinforcement Learning:

  •  In reinforcement learning, we have an agent to automatically determine the behavior, in order to improve the performance.
  • In reinforcement learning, software agent make decision on the basis of situation, to tackle the situation and also to improve the performance.
These are the types of Machine Learning, and brief introduction of these types.
I will come to you with some new aspect, till then

Enjoy with ML...

Wednesday, 13 December 2017

Hello My Friends,
How are you all?

This time I am here with a new topic and want to give you some more exiting thing...
Now a day we hear a word Machine Learning majority of times, even when we read any article related to AI. So, I thought this time let me represent Machine Learning in front of you.
Actually, Machine Learning is derived from Artificial Intelligence. We can say like Machine Learning is a child of Artificial Intelligence. Machine Learning means machine can be learning without program. i.e. Machine has to learn.


Now we have a question, Why Machine need to learn?
As a human being, we need to learn something regularly to update and upgrade ourselves, same as machine also has to learn to be upgraded. Because as technology grooves, Machine becomes older, so if machine can learn on it's own, it will be beneficial for it.

Applications for Machine Learning
There are lots of Applications available for Machine Learning such as, Bioinformatics, Search Engines, Speech Recognition, Software Engineering, Game Playing etc.

How to Work with Machine Learning?

First of all for machine learning there are lots of algorithms available for different modules and even we have lots of programming languages such as, Java, Python, R etc. we can work for machine learning using these languages. But the thing is How? Because there are lots of programming languages available and we have already known these different languages but with Machine Learning? So, for Machine Learning there are lots of libraries or modules or library packages available using these libraries we can work with any language for Machine Learning Algorithm.

So, if you can work with Java, you have different types of libraries available such  as, DL4J, Weka, Massive Online Analysis (MOA), Mallet etc.
Weka
Weka is GUI library for java. and generally used for data mining and analysis. it's strength lies in classification of data, clustering, association rule etc.
Massive Online Analysis(MOA)
MOA is used for data mining like weka. even we can combine these both weka and MOA. MOA is used for classification, regression, clustering etc.
DeepLearning4J
This library is specially designed for Deep Learning. It is used for commercial purpose and it is open source library. It is used for different patterns.It also works for Scala and  it is super power for deep neural network and reinforcement.
Mallet
It is another Java based open source library for natural language processing. and it also supports lots of different types of algorithms. such as, Naive Bayes, Decision Tree etc.

If you are a master in Python, you have Tensorflow, Scikit - learn, Pylearn2, NuPic like modules, using these modules you can work with Machine Learning.
Tensorflow
This module is used for high level neural network. It helps you to work with CPU or GPU. It mainly written in C++.
SciKit – learn
This python module is generally used to analyze and mine data. It builds by using NumPy, SciPy and matplotlib.
Pylearn2
This module is used for neural network. But it also work with other libraries i.e. we can combine other libraries with Pylearn2.
NuPic
This module does not work only for ML algorithms but it has some other functionality. It works with hierarchical temporal memory (HTM) is available in neural network. So, we can see it's powerful side. 

R is also used with Machine Larning, we have lots of libraries available such as, e1017, rpart, nnet, tree etc.
e1071
This package is used for fuzzy clustering, support vector machine, shortest path problem etc types of ML algorithms.
rpart
This package is used for recursive partitioning and regression trees type of machine learning algorithms.
nnet
This library package is used for Neural Network and log linear models in ML.
tree
As the name suggest, this library package is used for classification tree and regression tree.

Even we have lots of other languages, using these languages we can work with Machine Learning such scala, clojure etc. even C++ like languages also support Machine Learning.  

This is just a brief introduction of Machine Learning, and how to work with Machine Learning in Java and other languages. such as, Python and R. using different libraries and modules.
In next article of Machine Learning, I will be there with some new information related to ML.
Till then, Friends enjoy with Machine Learning.

Thursday, 30 November 2017



Hello everyone,

This time I am going to represent AI ( Artificial Intelligence ). Because now a days AI is
most demanding thing for current technology and trends. And big companies such as,
Google, Facebook, Microsoft etc. accept AI and take the big advantage from AI. AI is a
real future in the technological field. AI is very broad topic. We all are aware with AI, it is related to our daily life. But we never think about it.
Now, the thing is
What we think about, Artificial Intelligence?
Robots?
Fig 1. Robot

No, it is not just enough for robots or robotics, Robotics is different thing than AI. Yes
we can say robotics is a part of AI. But it is not fully AI.
 

AI is machine intelligence i.e. A Machine that represents it’s intelligence and it is
made by Human. That’s why Artificial Intelligence. Machine represents intelligence
like human but human beings and animals and other creatures have natural intelligence.
And machines have artificial intelligence. AI works on predefined tasks that is defined by
men when they designed it and set some algorithms. So, machine works as per it’s
algorithms and programming.

Research Areas for AI
Today, AI is hot topic for research. Different area for research in AI is, Robotics, Natural
Language Processing, Fuzzy Logic, Neural Network, etc. 

At present, all the above mentioned topics are very hot and popular today for research in
AI.

In these above domain, Robotics and machine learning both are hot favorite for
researchers.

Robotics is touching the sky i.e. it is available in all necessary areas in the
world at present, because now a days some country use robots in different areas such as,
robot for medical area, robot for business areas like automobile, finance, education etc.,

robot as home appliances etc. As we all know about sophia a humanoid. It gets the all
necessary privilege as human being. 

And Machine Learning is also a part of AI. It is the learning strategies for machine
through different algorithms.

In Natural Language Processing we have lots of natural languages to communicate but this time human communicate with computer. So, we need natural language processing and in which there are different applications such as, Speech recognition etc.
Neural Network as human we have brain and through our nervous system we can send a message to our brain, same as in AI neural network works as our nervous system.

This is the brief introduction of Artificial Intelligence. In next Article I will tell you more about AI.

Scope of AI  
Lots of scope for AI in current technology world. I mean at present in technology field lots of scope for AI. as I describe here Robotics, Machine Learning, Deep Learning, Speech recognition, Game Development, Computer Vision, Expert system etc. are the different scopes of AI.

What should you learn to work with AI?
To work with AI, you should learn Algorithms, Data structure, and some programming languages such as, C, LISP, Prolog, Now a days as per the current trends C++, Java or Python etc. Even Maths, specially Discrete Maths or you can say Maths with Logic, Science such as Biology, Physics etc. this mentioned things are necessary for learning AI.

Now, How to learn AI or from where to learn AI?
Some Institutes such as,
  • IIT Bombay
  • IIT Madras
  • IISc Banglore etc.
  • Hydrabad University
  • University of Edinburgh
  • University of Georgia etc.
Some Online Course,
After learning AI, you can get the Job as,
  • Game Developer
  • Computer Scientists
  • Robotics Scientists etc.
Now, you will get AI is most important thing to learn today....

So, Enjoy with AI....