# Realtime Chart in d3.js

Recently I was interested in making a realtime chart in d3 and had a hard time finding a simple tutorial on how to do it. This post is the tutorial I wish I was able to find.

This post will...

# Python Debugging: How to use pdb.pm()

Python’s debugger, pdb, is a great tool and one of my favorite uses of pdb is pdb.pm(). This post shows how to use pdb.pm() by working through an example of a buggy implementation of mergesort.

...

# Cluster a Correlation Matrix (in python)

Below is a function to rearrange variables in a correlation matrix (either pandas.DataFrame or numpy.ndarray) to group highly correlated variables near each other.

It turns a correlation matrix that looks like:

Into one...

# Effect size, Sample size, Significance and Power in Hypothesis Testing

When doing hypothesis testing, there are four related concepts one should keep in mind: effect size, sample size, significance threshold and power. Most people aware of hypothesis testing are likely aware of sample size and the significance threshold (typically denoted...

# Scikit-learn Tree Design

Scikit-learn has a well designed, extensible implementation of decision trees. The design pays dividends for techniques that rely on decision trees such as random forest. Overall, the design is a great example of thoughtfully designed machine learning code and is...

# Lazily Importing Python Modules

Recently, I found myself wanting to defer importing a python module so that it wasn’t actually imported until it was explicitly used.

After quite a bit of searching I discovered TensorFlow has a utility to lazily import modules. They...

# Understanding Stochastic Gradient Descent

Until recently, I thought of stochastic gradient descent as gradient descent… with a little bit of randomness. However, when I first looked up the details of stochastic gradient descent I was confused how it could possibly work. This post is...

# Narrow language features; the case for avoiding reduce

A narrow language feature leaves little ambiguity to the intent of the code. Therefore, an experienced reader can selectively skip details of the expression without loss of understanding. In contrast, a reader is forced to carefully inspect an expression that...