8 Plot types with Matplotlib in Python

Heatmap with Matplotlib imshow() function

Matplotlib, the most comprehensive visualisation library in Python for creating all kinds of plots of data visualization. However, it can also be a bit frustrating and daunting given so much you can do with Matplotlib. In this post, we will learn how to use 8 commonly used plot types, like scatter plot, histogram, with real… Continue reading 8 Plot types with Matplotlib in Python

PCA on S&P 500 Stock Return Data

PCA Plot S&P 500 Data : Highlight Select Sectors

This post is a fun exercise applying PCA (most in tidyverse framework) to stock data from S&P 500 index companies. With PCA on stock data from S&P 500, we can possibly do many interesting things, but we will focus on really simple things and try to see if PCA captures the general company trends from… Continue reading PCA on S&P 500 Stock Return Data

Linear Regression with Matrix Decomposition Methods

Add regression line using coefficients in lm() results

Still remember the first time I learned we can perform linear regression using matrix decomposition techniques like QR decomposition. Totally mind blown. Clearly had no clue that was possible. This is a fun post on performing linear regression using QR decomposition, Cholesky decomposition and Singular Value Decomposition (SVD) using #rstats. No theory behind it, just… Continue reading Linear Regression with Matrix Decomposition Methods

Difference between Numpy’s Permutation() and Shuffle() functions

In this post, we will learn about the differences between Numpy’s permutation() function and shuffle() function with examples. Numpy offers a variety of functions to randomize or create random data. Numpy’s permutation() and shuffle() functions are two key functions that help randomize existing 1-D array or 2D-arrays. First, we will start with how to use… Continue reading Difference between Numpy’s Permutation() and Shuffle() functions