Aditya Chatterjee's Blog, page 197
August 15, 2020
Graph Convolution Network (GCN)

Graphs in computer Science are a type of data structure consisting of vertices ( a.k.a. nodes) and edges (a.k.a connections). Graphs are useful as they are used in real world models such as molecular structures, social networks etc.
Graphs can be represented with a group of vertices and edges and can also be represented by an image depicting the connection between the nodes. For example let’s consider a chemical molecule in which there are several atoms...
August 14, 2020
Automatic Image Annotation / Image Captioning
Suggest some captions for this image!!
A boy playing with two dogs.
Two black dogs with a boy in snowy weather.
Both of these captions are valid for this image and many more might exist too.We can do this with ease just by looking at this image but can we write a computer program which can suggest a relevant caption after feeding an image to it?
With the recent advancements in deep learning this problem has become very easy provided the required dataset.
To better understand the probl...
A Deep Learning Approach for Native Language Identification (NLI)
By definition, Native-language identification (NLI) is the task of determining an author's native language based only on their writings or speeches in a second language. In this article, we will implement a model to identify native language of the author.
Introduction
PS: If you don't know what NLI is, I would recommend you to go to this link to understand the basics before you read the implementation.
NLI can be approached as a kind of text classification. We would be using BERT for this task....
August 12, 2020
Variants of Graph Neural Networks (GNN)

Graphs are data structures consisting of nodes and the relationships between nodes, known as edges. Recently there have been many model architectures leveraging the power of graphs and their characteristics. The fundamental models were called Graph Neural Networks. Once the potential was discovered of these graph-based models, the artificial intelligence community has continuously developed the variants of graph-based models depending on various use cases.
Just as a refresher, let us look at th...
August 11, 2020
Number of times characters of a string is present in another string
This problem is one of the classic competitive questions dealing with strings, I guess we can understand the logic by the question itself, so we will be given with two strings, the main string and the sample string. Now we need to compare and check how many times a charachter in the main string appers int the other i.e the count and finally in the end we need to return the total number. Now let's work on the implementation part but before we proceed please note that each and every character of ...
Web Scraping a CodeForces profile in Python
In this article, we will inspect a CodeForces profile’s site structure and scrape the required data. We will use this profile as an example. We will use the Beautiful Soup and Requests libraries of python for the purpose.
Scraping information is used to extract useful information from various websites. Sometimes, we need to use the content from websites but manually collecting the data can be both laborious and time-consuming.
Other uses of Web Scrapping are:
Search engine bots crawling a site...
Transitive Closure Of A Graph using Graph Powering
In this article, we will begin our discussion by briefly explaining about transitive closure and graph powering. We will also see the application of graph powering in determining the transitive closure of a given graph.
What is Transitive Closure of a graph ?
In any Directed Graph, let's consider a node i as a starting point and another node j as ending point. For all (i,j) pairs in a graph, transitive closure matrix is formed by the reachability factor, i.e if j is reachable from i (means ther...
August 2, 2020
Implementing a Binary Search Tree (BST) in C++
In this article, we have explained the idea of implementing Binary Search Tree (BST) from scratch in C++ including all basic operations like insertion, deletion and traversal.
Binary Search Tree is similar to a graph but with some special properties, a BST (Binary Search Tree) has a node, left pointer and a right pointer. They allow fast lookup, addition and removal of items, and can be used to implement either dynamic sets of items, or lookup tables that allow finding an item by its key.
Binar...
Sort a stack using another stack

In this article, we have explored an algorithm to sort a stack using another stack that is by using stack operations like push and pop only. The time complexity of this approach is O(N^2) and space complexity is O(N).
Stack : It is a linear data structure which follows a particular order in which the operations are performed. The order may be LIFO(Last In First Out) or FILO(First In Last Out).
Mainly the following three basic operations are performed in the stack:
Push: Adds an item in the stac...
July 28, 2020
Gated Graph Sequence Neural Networks (GGSNN)

Gated Graph Sequence Neural Networks (GGSNN) is a modification to Gated Graph Neural Networks which three major changes involving backpropagation, unrolling recurrence and the propagation model. We have explored the idea in depth.
We start with the idea of Graph Neural Network followed by Gated Graph Neural Network and then, Gated Graph Sequence Neural Networks.
Graph Neural Networks are great at some of the most complicated databases like social networking site data or logistic services and ev...