Author Archives: jamesdmccaffrey

The Worst Logistic Regression Graph Diagram on the Internet

Argh! I have to post on this topic. Strewn throughout the Internet is a graph that is supposed to explain what logistic regression is and how it works. I’ve seen this graph, and variations of it, for years and it … Continue reading

Posted in Machine Learning | 2 Comments

Neural Network Lottery Ticket Hypothesis: The Engineer In Me Is Not Impressed

The neural network lottery ticket hypothesis was proposed in a 2019 research paper titled “The Lottery Ticket Hypothesis: Finding Sparse, Trainable Neural Networks” by J. Frankle and M. Carbin. Their summary of the idea is: We find that a standard … Continue reading

Posted in Machine Learning | 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

Knowing When To Stop Training a Generative Adversarial Network (GAN)

A generative adversarial network (GAN) is a deep neural system that is designed to generate fake/synthetic data items. A GAN has a clever architecture made of two neural networks: a generator that creates fake data items, and a discriminator that … Continue reading

Posted in PyTorch | Leave a comment

A Quick Look at Uno Platform Development

The Uno platform is a software library that allows software developers create an application that targets Android devices, iOS devices, Windows devices, and Web applications. Put another way, using Uno, a software developer can write a single application that will … Continue reading

Posted in Miscellaneous | Leave a comment

Implementing Kullback-Leibler Divergence from Scratch Using Python

The Kullback-Leibler divergence is a number that is a measure of the difference between two probability distributions. I wrote some machine learning code for work recently and I used a version of a KL function from the Python scipy.stats.entropy code … Continue reading

Posted in Machine Learning | Leave a comment

Positive and Unlabeled Learning (PUL) Using PyTorch

I wrote an article titled “Positive and Unlabeled Learning (PUL) Using PyTorch” in the May 2021 edition of the online Microsoft Visual Studio Magazine. See https://visualstudiomagazine.com/articles/2021/05/20/pul-pytorch.aspx. A positive and unlabeled learning (PUL) problem occurs when a machine learning set of … Continue reading

Posted in Machine Learning, PyTorch | Leave a comment

Simple Ordinal Classification Using PyTorch

I was chatting with some of my colleagues at work about the topic of ordinal classification, also known as ordinal regression. An ordinal classification problem is a multi-class classification problem where the class labels to predict are ordered, for example, … Continue reading

Posted in PyTorch | Leave a comment

Logistic Regression Using PyTorch With L-BFGS Optimization

The PyTorch code library was designed to enable the creation of deep neural networks. But you can use PyTorch to create simple logistic regression models too. Logisitic regression models predict one of two possible discrete values, such as the sex … Continue reading

Posted in PyTorch | Leave a comment

Combining Two Different Logistic Regression Models by Averaging Their Weights

I was in a meeting recently and one of my colleagues briefly described some work he had done at a previous job. He had an enormous set of training data and wanted to train a logistic regression model. Logistic regression … Continue reading

Posted in PyTorch | Leave a comment