Aditya Chatterjee's Blog, page 208

May 23, 2020

Normalization in Machine Learning: A Breakdown in detail

Normalization in Machine Learning: A Breakdown in detail

This blog is part of a beginner-friendly introduction to some of the building blocks in Machine Learning. The goal is to simplify Math-heavy and counter-intuitive topics that can trip up newcomers to this exciting field!


When training a neural network one of the techniques to speed up your training is normalization of the input data. We shall see what this means and then explore the various normalization strategies, while also learning when they ought to be used.


What is Normalization?

Normaliz...

 •  0 comments  •  flag
Share on Twitter
Published on May 23, 2020 17:02

Reverse a linked list using 2 pointers technique using XOR operator

You must have come across reversing a linked list using 3 pointers technique which is the most common approach to do it. But do you know how to reverse a linked list with just 2 pointers? This article will teach you just that! Let's dive into it.


Introduction

Let us consider the following input :

(^ represents the head pointer to the list)


Input :

1 -> 2 -> 3 -> 4 -> 5

^

Our objective is to reverse the linked list by reversing its links


Expected Output :

1
..............................^


Befor...

 •  0 comments  •  flag
Share on Twitter
Published on May 23, 2020 06:10

Linear Search in C Programming Language

We have explored Linear Search algorithm and implemented variants of Linear Search in C Programming Language. The variants we have explored are:



Linear Search in array in C
Linear Search in Linked List in C
Linear Search in array with duplicates in C
Linear Search in Linked List with duplicates in C

Linear Search is a sequential search algorithm to find the position of a key in a given list of elements by traversing every element in the list until a match is found.


Though Linear search is the...

 •  0 comments  •  flag
Share on Twitter
Published on May 23, 2020 03:10

May 22, 2020

Techniques for Time Series Prediction

Techniques for Time Series Prediction

In Basics of Time series prediction, We talked about time series where we covered time series data, common patterns in time series data, training ,test and validation sets and statistical forecasting on time series data. We got pretty good results using statistical forecasting on the time series data(mean absolute error = 4.5).


The techniques for Time series prediction are:



Time Series Forecasting Using Artificial Neural Networks

Single Layer Neural Network
Recurrent Neural Networks
Long Shor...
 •  0 comments  •  flag
Share on Twitter
Published on May 22, 2020 15:42

Implement Memory Efficient Applications in Node.JS

Node.JS provides us with great APIs, modules, etc. for optimizing the code that is being run on Random Access Memory (RAM). With the help of the inbuilt tools provided by Node, we can change the way how our software runs in a system. Our software applications usually runs in a system's Primary memory i.e. Random Access Memory (RAM).


Node.JS allows us to write small to large sized applications and projects including Databases. Dealing with the software's efficiency and memory is always a challen...

 •  0 comments  •  flag
Share on Twitter
Published on May 22, 2020 04:18

May 21, 2020

An Introduction to Recommendation System

We are seeing an unprecedented rise in the use of the recommendation system in various services. Be it Youtube, Amazon, Netflix, advertisement, or an e-commerce site, these systems are unavoidable in our online journey. They aim to predict users' interests and suggest products that they might like according to their interests. Machine Learning approaches are common in Recommendation System.


Why do we need recommendation system?

They give users a lot of options which he or she might not have eve...

 •  0 comments  •  flag
Share on Twitter
Published on May 21, 2020 14:19

String Matching using Bitset

In this article, we have explored how to solve string matching problem (find all occurences of string S1 in another string S2) using Bitset. It is a modification of the naive approach which takes O(L x P x logL) time complexity and assumes all positions to be potential matches and eliminates them based on previous comparisons. The modification with bitset improves the time complexity to O(L x P / K) where L is length of string S2, P is length of string S1 and K is register size.


Bitset

Bitset i...

 •  0 comments  •  flag
Share on Twitter
Published on May 21, 2020 11:05

Designing Complex Numbers using Classes in Python

In a previous article, we talked about complex numbers in Python using built-in classes and attributes to perform operations on them. But, imagine if Python didn't come equipped with these conveniences. How would we go about implementing complex operations? We can explore that concept by utilizing built-in mathematical operations to create our own complex class in Python.


To start off, we need to initialize our complex number:


def __init__ (self, real, imag=0.0):
'''Form complex number'''
...
 •  0 comments  •  flag
Share on Twitter
Published on May 21, 2020 04:53

May 20, 2020

Sorting a 2 Dimensional (2D) vector in C++

Vectors are data structures similar to array but with features such as dynamic memory, resizable container, insertion and deletion of elements. Vector elements are places in contiguous storage so that they can be accessed and traversed using iterators. A 2D vector is vector of vectors. It is an matrix implemented with the help of vectors.


In this article, we will explore different ways to sort a 2 dimensional (2D) vector in C++ which includes sorting by row, column, a specific row or a specific...

 •  0 comments  •  flag
Share on Twitter
Published on May 20, 2020 16:01

Solving Linear Programming problems in Python using cvxpy library

Mathematical Programming is used to find the best or optimal solution to a problem that requires a decision or set of decisions about how best to use a set of limited resources to achieve a state goal of objectives.


Linear programming requires that all the mathematical functions in the model be linear functions. We have solved linear programming problems in Python using cvxpy library.



Learn how to formulate Linear Programming problems


Mathematical formulation

Decision variables: X1, X2, X3, ....

 •  0 comments  •  flag
Share on Twitter
Published on May 20, 2020 04:53