Author Archives: jamesdmccaffrey

How to Fine-Tune a Transformer Architecture NLP Model in Visual Studio Magazine

I wrote an article titled “How to Fine-Tune a Transformer Architecture NLP Model” in the November 2021 edition of Microsoft Visual Studio Magazine. See https://visualstudiomagazine.com/articles/2021/11/16/fine-tune-nlp-model.aspx. My article describes how to fine-tune a pretrained Transformer Architecture model for natural language processing. … Continue reading

Posted in Machine Learning | Leave a comment

The Traveling Salesman Problem Using Simulated Annealing In C#

The Traveling Salesman Problem (TSP) is a standard combinatorial optimization problem. The goal is to find the best route that visits all cities, where best route usually means shortest distance. Simulated Annealing is a very simple heuristic for solving combinatorial … Continue reading

Posted in Machine Learning | Leave a comment

NFL 2021 Week 13 Predictions – Zoltar Likes Vegas Favorites Bengals and Dolphins

Zoltar is my NFL football prediction computer program. It uses reinforcement learning and a neural network. Here are Zoltar’s predictions for week #13 of the 2021 season. It usually takes Zoltar about four weeks to hit his stride and takes … Continue reading

Posted in Zoltar | Leave a comment

Data Pipeline Processing in Machine Learning

A common task when designing and implementing machine learning systems is reading data from a file (or SQL table) then performing a sequence of tasks on that data in order to get the data ready for consumption by an ML … Continue reading

Posted in Machine Learning | Leave a comment

Multivariate Gaussian Probability Density Function from Scratch (Almost)

I was writing some code that needed to compute the probability density function (PDF) value for a multidimensional Gaussian vector. The regular one-dimensional Gaussian function PDF is the bell-shaped curve. For example if mean = u = 0.0, and standard … Continue reading

Posted in Machine Learning | Leave a comment

My Top Ten Favorite Science Fiction Movies of the 2000s

There are many science fiction movies that I like from the decade of 2000 to 2009. Here are my 10 favorites. They’re not necessarily the best movies of the decade, but they’re ones I’d take with me if I was … Continue reading

Posted in Top Ten | Leave a comment

Researchers Explore Differential Privacy on Pure AI

I contributed to an article titled “Researchers Explore Differential Privacy” on November 2021 edition of the Pure AI web site. See https://pureai.com/articles/2021/11/08/differential-privacy.aspx. In a nutshell, differential privacy consists of a set of techniques designed to prevent the leakage of sensitive … Continue reading

Posted in Machine Learning | Leave a comment

NFL 2021 Week 12 Predictions – Zoltar Likes the Packers to Cover Against the Rams

Zoltar is my NFL football prediction computer program. It uses reinforcement learning and a neural network. Here are Zoltar’s predictions for week #12 of the 2021 season. It usually takes Zoltar about four weeks to hit his stride and takes … Continue reading

Posted in Zoltar | Leave a comment

Working with Multi-Dimensional Arrays is Difficult

I often teach introductory machine learning to software engineers who have a lot of programming experience but have little experience with ML. One of the biggest challenges for engineers who are new to ML is something nobody ever talks about … Continue reading

Posted in Machine Learning | Leave a comment

The Kendall Tau Distance For Permutations Example Python Code

Suppose you have two mathematical permutations such as p1 = (2,0,3,1) and p2 = (0,2,1,3) and you want to measure the distance / difference between the permutations. This is a surprisingly tricky question. One approach is to compute the Kendall … Continue reading

Posted in Machine Learning | 2 Comments