In this post, we will see 10 tips to annotate a plot with a title and to customize title text of a plot made with ggplot2. We will start with how to add title to a plot made with ggplot2 using two functions ggtitle() and labs(). And then we will learn how to use ggplot2’s […]
8 Plot types with Matplotlib in Python
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 […]
PCA on S&P 500 Stock Return Data
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 […]
Linear Regression with Matrix Decomposition Methods
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 […]
Numpy’s random choice() function
In this post we will learn how to use Numpy’s choice function. Numpy’s choice() function is a useful tool for selecting random items from a list or array. The basic syntax of choice() function Numpy’s random module is this Here, a is the list or array from which you want to select items, size is […]