Category Archives: JavaScript

“Kernel Ridge Regression with Stochastic Gradient Descent Training Using JavaScript” in Visual Studio Magazine

I wrote an article titled “Kernel Ridge Regression with Stochastic Gradient Descent Training Using JavaScript” in the September 2025 edition of Microsoft Visual Studio Magazine. See https://visualstudiomagazine.com/articles/2025/09/02/kernel-ridge-regression-with-stochastic-gradient-descent-training-using-javascript.aspx. The goal of a machine learning regression problem is to predict a single … Continue reading

Posted in JavaScript, Machine Learning | Leave a comment

Absolute Simplest Possible OpenAI API (ChatGPT) Example Using JavaScript on Windows

One of my colleagues asked me to explain how to programmatically call the OpenAI API (ChatGPT). I figured I’d search the Internet for the simplest possible example and point him to it, but literally every example I found wasn’t very … Continue reading

Posted in JavaScript, OpenAI | Leave a comment

Kernel Ridge Regression with Stochastic Gradient Descent Training Using JavaScript

Kernel ridge regression (KRR) is a technique to predict a single numeric value. KRR uses a kernel function, which compares two vectors and computes a measure of their similarity. This allows KRR to handle complex non-linear data. KRR uses the … Continue reading

Posted in JavaScript, Machine Learning | Leave a comment

“Implementing k-Nearest Neighbors Regression Using JavaScript” in Visual Studio Magazine

I wrote an article titled “Implementing k-Nearest Neighbors Regression Using JavaScript” in the August 2025 edition of Microsoft Visual Studio Magazine. See https://visualstudiomagazine.com/articles/2025/08/04/implementing-k-nearest-neighbors-regression-using-javascript.aspx. The goal of a machine learning regression problem is to predict a single numeric value. For example, … Continue reading

Posted in JavaScript, Machine Learning | Leave a comment

Generating Gaussian Distributed Numbers Using JavaScript

One Sunday evening, for no reason I can remember, I thought about generating random Gaussian numbers using the Box-Muller algorithm with JavaScript. Yes, my life is pretty sad sometimes. I reviewed my blog posts and discovered that I had tackled … Continue reading

Posted in JavaScript, Machine Learning | Leave a comment

Computing the Determinant of a Matrix Using Gaussian Elimination to Row Echelon Form With JavaScript

One morning before work, I figured I’d implement a function to compute the determinant of a matrix using the Gaussian elimination to row echelon form technique, using the JavaScript language. In machine learning scenarios, the determinant is most often used … Continue reading

Posted in JavaScript, Machine Learning | Leave a comment

Computing a Matrix Inverse Using Newton Iteration With JavaScript

Dozens of machine learning algorithms require computing the inverse of a matrix. Computing a matrix inverse is conceptually easy, but implementation is one of the most difficult tasks in numerical programming. The Wikipedia article on matrix inverse lists 14 different … Continue reading

Posted in JavaScript, Machine Learning | Leave a comment

Simple k-Nearest Neighbors Regression Using JavaScript

The goal of a machine learning regression problem is to predict a single numeric value. For example, you might want to predict an employee’s salary based on age, current bank account balance, years of experience, and so on. There are … Continue reading

Posted in JavaScript, Machine Learning | Leave a comment

“Linear Regression Using JavaScript” in Visual Studio Magazine

I wrote an article titled “Linear Regression Using JavaScript” in the July 2025 edition of Microsoft Visual Studio Magazine. See https://visualstudiomagazine.com/articles/2025/07/07/linear-regression-using-javascript.aspx. The goal of a machine learning regression problem is to predict a single numeric value. For example, you might … Continue reading

Posted in JavaScript, Machine Learning | Leave a comment

Loading Data From a Local Text File into a Matrix Using Client-Side JavaScript

An interesting machine learning scenario is running a prediction system, such as kernel ridge regression, in a browser. All machine learning systems begin with the data. In a Web environment, you can use data stored on the Web server, or … Continue reading

Posted in JavaScript, Machine Learning | Leave a comment