Category Archives: Machine Learning

Calling a Function Many Times that Generates Random Numbers and the Role of Experience in Programming

There are two main advantages of experience for computer programmers. First, an experienced programmer has a mental catalog of many techniques and doesn’t have to do much research and so he is much faster than an inexperienced programmer. Second, an … Continue reading

Posted in Machine Learning, Miscellaneous | Comments Off on Calling a Function Many Times that Generates Random Numbers and the Role of Experience in Programming

Weighted k-NN Classification Using C#

I wrote an article titled “Weighted k-NN Classification Using C#” in the May 2019 issue of Microsoft MSDN Magazine. See https://msdn.microsoft.com/en-us/magazine/mt833446. The k-NN (k-nearest neighbors) algorithm is very simple but there are several tricky implementation details. In the article I … Continue reading

Posted in Machine Learning | Comments Off on Weighted k-NN Classification Using C#

Computing the Inverse of Matrix

The inverse of a matrix is used in many, many machine learning algorithms. In ordinary mathematics, the inverse of a number n is a number ni so that n * ni = 1. For example, if n = 5 the … Continue reading

Posted in JavaScript, Machine Learning | Comments Off on Computing the Inverse of Matrix

Investigating Neural Network Dropout Using JavaScript

I have implemented quite a few different types of neural networks using several different programming languages. The other day I took a close look at implementing a neural network with dropout training, using JavaScript. Dropout is a technique that is … Continue reading

Posted in JavaScript, Machine Learning | 4 Comments

The Difference Between Linearly Separable Data and a Linear Classifier in Machine Learning

The terms “linearly separable data” and “linear classifier” often appear in the context of machine learning. The terms sound a lot alike but aren’t closely related in the context of ML, even though the terms are closely related in the … Continue reading

Posted in Machine Learning | Comments Off on The Difference Between Linearly Separable Data and a Linear Classifier in Machine Learning

Weighted k-NN Classification Using Python

I wrote an article titled, “Weighted k-NN Classification Using Python” in the April 2019 issue of Visual Studio Magazine. See https://visualstudiomagazine.com/articles/2019/04/01/weighted-k-nn-classification.aspx. The weighted k-nearest neighbors (k-NN) classification algorithm is a relatively simple technique to predict the class of an item … Continue reading

Posted in Machine Learning | Comments Off on Weighted k-NN Classification Using Python

Neural Network Momentum using JavaScript

I’ve been slowly but surely implementing core neural network functionality using the JavaScript language. My most recent exploration was modifying a back-propagation function so that it used momentum. The motivation is to speed up training. The idea is best explained … Continue reading

Posted in JavaScript, Machine Learning | 2 Comments

I Give a Talk on Binary Classification Using Keras

I recently gave a short workshop/talk at the tech company I work for on binary classification using the Keras neural network code library. The goal of a binary classification problem is to predict something that can take on one of … Continue reading

Posted in Keras, Machine Learning | 1 Comment

The Difference Between Cross Entropy and Binary Cross Entropy

The basic ideas of cross entropy error and binary cross entropy error are relatively simple. But they’re often a source of confusion for developers who are new to machine learning because of the many topics related to how the two … Continue reading

Posted in Machine Learning | 2 Comments

Applying a Permutation to an Array

A permutation of order n is an arrangement of the numbers 0 through n-1. For example, one permutation of order 5 is (4, 2, 0, 1, 3). Suppose you have an array of (“C”, “E”, “A”, “B”, “D”) and the … Continue reading

Posted in Machine Learning | Comments Off on Applying a Permutation to an Array