Category Archives: Machine Learning

Buster Blackjack

Most of the technical conferences I speak at are in Las Vegas. One of the things I love about Las Vegas is the constant innovation — every trip I see new restaurants, new kinds of entertainment, and new games. When … Continue reading

Posted in Machine Learning, Miscellaneous | Leave a comment

Log Odds and Logistic Regression

When I was a university professor, one of the most difficult topics I had to explain was the connection between logistic regression and log odds. There are several interrelated ideas, and although each idea is quite simple, when you combine … Continue reading

Posted in Machine Learning | Leave a comment

Logistic Regression Update Rule Assuming Squared Error Loss

The hardest part about this blog post is explaining the problem. The answer is easy: when performing training for Logistic Regression using stochastic gradient ascent/descent, the update rule should be based on using cross entropy loss rather than using squared … Continue reading

Posted in Machine Learning

Logistic Regression with Raw Python

I consider Logistic Regression (LR) to be the Hello World of machine learning (ML). In LR, the goal is to predict a value that can be only one of two things. For example, you might want to predict which of … Continue reading

Posted in Machine Learning

Cross Entropy for Binary Classification

Suppose you are using a neural network to try and predict the color of a traffic signal. The possible values are red = (1, 0, 0), yellow = (0, 1, 0), green = (0, 0, 1). Your neural network spits … Continue reading

Posted in Machine Learning

Graphing the Decision Boundary for a Logistic Regression Model

The basic form of Logistic Regression (LR) uses two or more numeric predictor variables to predict a binary value. For example, you might want to predict the sex of a person (male = 1, female = 0) based on age … Continue reading

Posted in Machine Learning

Reading Data from a File into a NumPy Matrix

In many machine learning scenarios, you have to read training data from a text file into a matrix. When using Python with TensorFlow or CNTK, I often use the NumPy loadtxt() function. Suppose you have a text file with four … Continue reading

Posted in CNTK, Machine Learning