Data Structures and Algorithms in Python – Graphs

Graph Implementation – Adjacency list We’ve used dictionaries to implement the adjacency list in Python which is the easiest way. To implement Graph ADT we’ll create two classes, Graph, which holds the master list of vertices, and Vertex, which will represent each vertex in the graph. Each Vertex uses a dictionary to keep track of… Read More »

Implemeting Data Structures and Algorithms in Python: Problems and solutions

Recently I have started using Python in a lot of places including writing algorithms for MI/data science,  so I thought to try to implement some common programming problems using data structures in Python. As I have mostly implemented in C/C++ and Perl. Let’s get started with a very basic problem. Anagram algorithm An algorithm will… Read More »

Choropleth Maps in Python

Choropleth maps are a great way to represent geographical data. I have done a basic implementation of two different data sets. I have used jupyter notebook to show the plots. World Power Consumption 2014 First do Plotly imports import plotly.graph_objs as go from plotly.offline import init_notebook_mode,iplot init_notebook_mode(connected=True) Next step is to fetch the dataset, we’ll use… Read More »

Developing data products course project

I have made a small project which demonstrate Water Quality of River Ganga (India) in various places on-route (Year 2012) as a part of JHU Coursera Data Science specialization. This project have two parts: Created a Shiny Application I have created a Shiny Application to demonstrate Water Quality of River Ganga (India) in various places on-route… Read More »

Interesting Machine learning algorithms in R

Widely used Machine learning algorithms in R Linear discriminant analysis (LDA) — MASS package of R can be used Regression (Linear & Logistic) Naive Bayes Support vector machines (SVM) Classification and regression trees Random forests (Tree based modelling) — There is excellent package randomForest in R K-Means clustering — Kmeans package of R can be… Read More »

JHU Data Science Specialization Capstone

I have created a text prediction application as a part of Coursera Johns Hopkins University Capstone project. Check below for resources. Next Word Text Prediction Algorithm — Data Science Capstone Project by JHU and Swiftkey Presentation: http://rpubs.com/ppant/capstone-presentation Application: https://ppant.shinyapps.io/nextWordPredict/ Code: https://github.com/ppant/Coursera-Data-Science-Capstone-Project   Request to use and provide your valuable suggestions for improvement. Thanks