All Articles

Simple Markov Chain for Similarity

A simple machine learning feedback loop
Fig.1 A simple machine learning feedback loop

Introduction

The Markov Chain is a simple data model that can be used to represent transitions between elements with a probability.

In this blog post, I am going to explore the potential of an algorithm inspired by the Markov Chain model.


Algorithm

You can find the complete algorithm on this gist, here is a simpler version of it:

const features = extractFeatures();
const similarities = [];
const db = getDB();
features.forEach((elem) => similarities.push(Similarity(elem, db)));
return maxOf(similarities);
i++;

See also