Category Archives: Miscellaneous

Example of Calculating the Energy Distance Between Two Samples

I stumbled across an interesting idea called energy distance. Energy distance is a number that is a measure of the distance between two distributions. There are many other ways to define the distance between two distributions. The Kullback-Leibler divergence is … Continue reading

Posted in Miscellaneous | 1 Comment

Great Technology in Vegas That Fails Because It’s Too Good

I noticed an example where great technology is rendered useless because of a lack understanding of human psychology. My story takes place in Las Vegas. I was there speaking at a conference. Before I explain, it’s important to know that … Continue reading

Posted in Miscellaneous | 1 Comment

Examples of Python Colormaps for Surface Plots

I was sitting in an airport recently, waiting to board a plane to fly to a conference. I wanted to make use of the time so I decided to review the different colormaps for use with Python matplotlib 3D surface … Continue reading

Posted in Miscellaneous | Leave a comment

Example of Kernel Density Estimation (KDE) Using SciPy

I was chit-chatting with a colleague a couple of days ago and the topic of kernel density estimation (KDE) came up. The first hurdle when trying to understand KDE is figuring out exactly what kind of problem the technique solves. … Continue reading

Posted in Miscellaneous | Leave a comment

Jensen-Shannon Distance Example

The Jensen-Shannon distance measures the difference between two probability distributions. For example, suppose P = [0.36, 0.48, 0.16] and Q = [0.30, 0.50, 0.20]. The Jenson-Shannon distance between the two probability distributions is 0.0508. If two distributions are the same, … Continue reading

Posted in Miscellaneous | Leave a comment

Whatever Happened to Percolation Theory?

Many years ago I was quite interested in mathematical percolation theory. But over the past 10 years or so I haven’t seen many new research papers published on the topic. This figure illustrates some of the main ideas of percolation: … Continue reading

Posted in Miscellaneous | Leave a comment

The Birthday Paradox

If you have 70 people in a room, what is the probability that two or more of them have the same birthday? Most people guess something like 70/365 = 0.19 or 19%. But amazingly, the probability is 0.9990 — almost … Continue reading

Posted in Miscellaneous | Leave a comment

A Quick Look at the Oqtane Framework

Oqtane is an open source framework for building Web applications based on Microsoft .NET Blazor technology. Whoa. That’s a lot to grok. It’s not all that difficult to create a Web application using basic HTML, CSS, and JavaScript. But there … Continue reading

Posted in Miscellaneous | Leave a comment

Using Built-In Library Functions vs. Using A Custom Function

I ran into some code that made me think about the nature of coding and computer science. I was reviewing some PyTorch documentation example code and saw a statement that looked something like: foo = torch.tensor(foo[:-1]).cumsum(dim=0).to(device) From the context of … Continue reading

Posted in Miscellaneous | Leave a comment

Scott’s Pi for Inter-Rater Reliability

Scott’s pi is one of many classical statistics metrics that can be used to measure how well two raters agree when they rate a set of items. Scott’s pi, like other inter-rater reliability metrics, is used for a very specific … Continue reading

Posted in Miscellaneous | Leave a comment