DEV Community

ANISHA SWAIN | The UI Girl
ANISHA SWAIN | The UI Girl

Posted on • Originally published at theuigirl.hashnode.dev on

Introduction to Neural Networks

MACHINE LEARNING

Artificial Intelligence is everywhere and have touched almost every aspect of our lives.

In todays world, Artificial Intelligence is everywhere and have touched almost every aspect of our lives. From personalized suggestion in e-commerce websites to self-driving cars, artificial intelligence is everywhere.

Machine learning, Deep learning, which is part of a broader family of machine learning methods based on artificial neural networks to achieve Artificial Intelligence and Neural Networks is the heart of Deep Learning. Heavy words huh!!

Previously when I used to think of Neural Networks, I used to think of a giant black box and then I started my scholarship challenge course with Bertelsmann Tech Scholarship Challenge CourseAI Track Nanodegree Program and realised that it is much more complex than that. A giant tree structure with so many nodes and sub-nodes.

But after going through the explanations I understood that Neural Networks simply classify two different types of data points (simple definition). It looks for the best boundary to separate the data and the separation line between the data points is called the Boundary Line. Just that, the more complex the boundary, the more complex the algorithm to separate them.

And in this article, we will understand the basics of linear boundary lines

In the given exp in the side, I have classified the dots and triangles dots with a boundary line and any point that falls above the line is classified as a dot and the point that falls below as a triangle. Though there might be an error for some points, the correctness of the classification decides the efficiency of the model. This line is our Model and it can be represented as a linear equation.

Now the question is, how to find this line. See the derivation below

2-DIMENSIONAL DATA:

Lets consider a point on X-axis as X1 and Y-axis as X2. Then the linear equation for the line would be:

w1.x1 + w2.x2 + b = 0

Where X=(x1,x2) is the point of graph, W=(w1,w2) are weights and b i s the bias value.

Now, if we put the value of (x1,x2) in the equation, the output of the same is called SCORE. Based on the Score we find out the PREDICTION.

The Prediction is denoted as LABEL i.e Y=0 or 1

If the Score is greater then equals to 0 then the Prediction is POSITIVE (i.e label is 1 or we consider it as triangle) and if the Score is less then 0 then the Prediction is NEGATIVE(i.e label is 0 or we consider it as dots).

We can also simplify the equation as Wx+b =0

In the case of 2-Dimensional plane i.e 2 columns of data, the boundary line is a 1D straight line.

3-DIMENSIONAL DATA:

For 3 dimension lets consider three points i.e (x1,x2,x3). This will make 3 columns of data. Now the boundary line equation would be:

w1.x1 + w2.x2 + w3.x3 + b = 0

The condition for finding SCORE and PREDICTION LABEL will still remain the same and the boundary line will be a 2D plane.

HIGHER DIMENSIONAL DATA

Similarly, for higher dimensions (for example, n-Dimension), it will create a dataset of n-columns with boundary equation of:

w1.x1 + w2.x2 ++wn.xn + + b = 0

This time the boundary line will become a (n-1) dimensional hyperplane and the dimensions for the inputs will be w:(1xN), x:(nx1), b:(1x1).

So, thats all about the basics. In the next article, we will discuss Perceptrons in Neural Networks. Till then, stay tuned. Happy Coding!

Top comments (0)