Long after I learned how to calculate the geometric and harmonic means, I was still unclear about what exactly they were doing for me. I ended up clarifying this to myself by generating a series of visualizations which I’ll show you in this post.

First, a quick review of the algorithms themselves.

The Pythagorean means. 𝑎 is a tuple/array/list. 𝑛 is the length of 𝑎. (∑ notation) (∏ notation)

The arithmetic mean is what people are usually talking about when they say “average”. By far the most widely used, it’s simple to calculate. You sum the parts, then divide by how many there were.

The geometric mean has the same procedure but different operations. You multiply the…

Predicting court decisions using machine learning

Photo by walknboston

A few months ago I was hunting for a machine learning side project when I bumped into the Federal Contractor Misconduct Database. Curated by the nonprofit Project on Government Oversight (POGO), each entry in the database represents an incident in which a company working for the federal government was accused of violating a law or regulation. POGO publishes the database publicly to discourage federal agencies from signing further deals with offenders.

A sample entry:

Instance Inadequate Number of Anesthesiologists in Texas Contractor(s) Humana Misconduct Type Consumer Affairs Date Type Date of Consent Orders Date 10/8/2018 Contracting Party None Enforcement Agency…

Luke Persola

Data Science Engineer www.lukepersola.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store