Author Archives: jamesdmccaffrey

Recap of the 2021 ISC West Security Conference

I gave a short talk at 2021 ISC West Security Conference. The event was held July 19-21 in Las Vegas, Nevada. My talk was titled “AI and ML for Cyber Threat Prevention”. The ISC West event covers all aspects of … Continue reading

Posted in Conferences | 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

Dealing With PyTorch Library Versioning

It’s a major challenge to deal with the compatibility of the dozens of Python based libraries needed to work with the PyTorch neural network library. I was currently using PyTorch version 1.8 (for CPU) along with the Anaconda3-2020.02 distribution which … Continue reading

Posted in PyTorch | Leave a comment

Zoltar 2021 NFL Football Predictions – Preparing Schedule Data

Zoltar is my NFL football prediction computer program. It uses a deep neural network and a form of reinforcement learning. I’ve been running Zoltar for several years and always enjoy the challenge — success or failure is unambiguous. It’s not … Continue reading

Posted in Zoltar | Leave a comment

Researchers Use Machine Learning Techniques to Detect Compromised Network Accounts on the Pure AI

I contributed to an article titled “Researchers Use Machine Learning Techniques to Detect Compromised Network Accounts” on the Pure AI web site. See https://pureai.com/articles/2021/07/06/ml-detect.aspx. The article describes how researchers and engineers (including me) developed a successful system that detects compromised … Continue reading

Posted in Machine Learning | Leave a comment

Differential Evolution Optimization Example Using Python

An Evolutionary Algorithm (EA) is one of many algorithms that are loosely based on the biological ideas of genetic crossover and mutation. Differential Evolution (DE) is a specific type of EA that has a bit of structure. I’m very familiar … Continue reading

Posted in Machine Learning | Leave a comment

Computing PCA Using NumPy Without Scikit

Principal component analysis (PCA) is a classical statistics technique that can do data dimensionality reduction. This can be used to graph high dimensional data (if you reduce the dim to 2), or to clean data (by reconstructing the data from … Continue reading

Posted in Machine Learning, PyTorch | 1 Comment

Particle Swarm Optimization Variants

Particle swarm optimization (PSO) is a meta-heuristic that can be used to construct a specific algorithm to find the minimum of an error function. In theory, PSO could improve neural network training because PSO does not use Calculus gradients like … Continue reading

Posted in Machine Learning | Leave a comment

Sentiment Analysis Using a PyTorch EmbeddingBag Layer in Visual Studio Magazine

I wrote an article titled “Sentiment Analysis Using a PyTorch EmbeddingBag Layer” in the July 2021 edition of the online Microsoft Visual Studio Magazine. See https://visualstudiomagazine.com/articles/2021/07/06/sentiment-analysis.aspx. Natural language processing (NLP) problems are very difficult. A common type of NLP problem … Continue reading

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