Gradient Descent Algorithm Matlab Implementation

Here’s a very basic Matlab implementation of the gradient descent algorithm for linear regression. The following plot shows the cost for every iteration in the algorithm. It should be decreasing function as in each iteration we try to move towards the global minimum direction.

Read more

Exploratory Data Analysis Traffic Accidents in Georgia

I recently obtained access to a large dataset for traffic accidents in the state of Georgia for a school project and I thought it would be fun to do some exploratory data analysis and to visualize the data using python. The file comes from Georgia Department of Transportation and it ranges from 2006to 2016. For […]

Read more

KNN Algorithm Matlab Implementation

This is a KNN algorithm implementation written in Matlab. In this example, I’m just using some random numbers for X, Y, and the according labels. There are 3 classes differentiated by color. For the distance I chose Euclidean distance. The algorithm loops through all records in the dataset, finds K closest neighbor points, and predict […]

Read more

Visualize Twitter Network using Python

Graph visualization is very useful in analyzing social networks. Here’s an implementation for a Twitter network of Elon Musk using tweepy and gephi.First we will utilize the Twitter API. Once you get the key and token codes, we can start requesting data through the keys. Next we can get the top 20 friends using tweepy. […]

Read more