Category Archives: 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 | Leave a comment

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 | Leave a comment

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 | Leave a comment

Neural Network Back-Propagation Using JavaScript

For the past few months, I’ve been slowly exploring the idea of implementing a neural network using raw (no libraries) JavaScript. Once every few days, on my lunch break, I’d design and code a few modules. This morning I made … Continue reading

Posted in JavaScript, Machine Learning

Machine Learning Interpretability and Counterfactual Explanations

Suppose you own a loan company and you have some prediction model that predicts the probability that a person applying for a loan will successfully repay the loan. The prediction model is based on x1 = annual income, x2 = … Continue reading

Posted in Machine Learning