Skip to content

Instantly share code, notes, and snippets.

View Jverma's full-sized avatar

Janu Verma Jverma

View GitHub Profile
@Jverma
Jverma / README.md
Created January 30, 2016 21:34
Understanding PageRank in a network graph

Visualizing pagerank of nodes in a graph.

Example studied is that of extracting most informative sentences from a textual document for auto summarization. Uses the LexRank algorithm. A graph G is created where :

  • Nodes: All sentences of the document.
  • Edges: There is an edge between two nodes if the frequency vectors of the corresponding sentences have (cosine) similarity above a threshold. For more details on SentenceGraph, refer to TextGraphics

LexRank asserts that PageRank (now called LexRank) scores of sentences in such a graph can be used to rank sentences in the order of their relevance to the document. And in turn, can be used for generating a summary of teh document.

@Jverma
Jverma / SetUp.md
Last active April 28, 2016 13:23
Conda environment for TensorFlow

Conda development environment for a project involving Google TensorFlow.

  • Setup the environment
conda env create
  • Activate the environment
source activate ENV_NAME
@Jverma
Jverma / README.md
Last active September 8, 2017 12:52
HTML element inside a SVG

HTML inside a SVG using foreignObject.

How to add a non-svg (html) element inside svg.

@Jverma
Jverma / Jekyll.md
Last active January 2, 2016 21:48
Instructions to set up

Instructions to set up a Jekyll blog

Requirements:

  • gem
  • Jekyll
  • bundler

Install Jekyll

gem install jekyll
@Jverma
Jverma / README.md
Created July 20, 2015 02:02
Communities in a graph

Detecting communities in the given graph usng Girvan-Newman Algorithm I wrote a python script to extract the communities.

@Jverma
Jverma / README.md
Created July 19, 2015 19:29
K-means clustering of wine data

I wrote a blog post for packtpub describing the K-means clustering procedure. The codes I provided were written in R, I also pointed to another blog post of mine where I use python to explain this algotithm. I decided to write a D3 visualization of the clusters.

@Jverma
Jverma / README.md
Created July 19, 2015 16:13
HighChart - line chart of the tweet sentiment score time series

Interactive line chart showing the time series of the total sentiment scores of the tweets realted to a topic extracted using search API. Sentiment on a day is the average of the sentiment scores of all the tweets realted to the given topic extracted that day.

@Jverma
Jverma / README.md
Created July 19, 2015 15:15
Sentiment Scores of Tweets

Scatterplot of sentiment scores of tweets extracted using search API.

The sentiment is calculated using AFINN scores. For more information see Twitter Sentiment Analysis

It can be seen that a lot of the tweets are neutral (zero sentiment score).

@Jverma
Jverma / README.md
Created July 19, 2015 15:11
K-Means clustering of Tweets

K-means clustering of the tweets extracted using search API.

@Jverma
Jverma / README.md
Last active August 29, 2015 14:24
Hive Plot with mouseover

Attempt at understanding Hive Plot and creating a D3 visual. Mouseover at each node shows the name and type of the node.

"Hive plots define a linear layout for nodes, grouping nodes by type and arranging them along radial axes based on some property of data. The explicit position encoding has the potential to better reveal the network structure while communicating additional information." - Mike Bostock's blog on Hive Plots.