K-means clustering has many potential applications in data analysis problems where relationships among large number of samples need to be discovered. The concept behind the technique is quite simple and therefore also very flexible, it can be used alone with many possible configurations or in conjunction with other machine learning…

Three sum is a popular algorithm question, it’s complexity lower bound has important implications in many related problems. Let’s take a look.

Start out simple

The simplest way to solve the three sum problem is actually to start out with solving the two sum problem. So let’s try that first.

…

Have you ever gotten the warning in Pycharm that says:

Comparison with None performed with equality operators

and wondered why?

Well, today we are going to get to the bottom of the mystery once and for all!

Be prepared, this is actually quite a deep question that might cause you…

In this story, we are going to talk about an interesting problem about finding maximum integers in a list. …

In this story, we are going to discuss an application of dynamic programming techniques to an optimization algorithm. Through the process of developing an optimal solution, we get to study a variety of programming techniques that leads to better performance (with a surprise at the end!).

The Knapsack problem

This…

Signal combinations are important in many fields, it is also important in portfolio construction, let’s find out why.

Not always

Suppose I have a portfolio (1) that returns 1% on even days and 0.5% on odd days:

Whenever people talk about Natural Language Processing(NLP), images of fancy machine learning models and prospects of powerful AI pop up. But nothing starts from nowhere, at the most rudimentary level, NLP is simply a collection of tools for processing textual data to makes them clean and more uniform. Let’s begin!

…

As I accumulate more experience in coding and life in general, one of the things among my observations that stood out to me is that, whenever there is a problem to be solved, there usually exists a very intuitive solution to it. Sometimes this solution happens to be efficient, sometimes…

When I first started learning to use Kalman filter, it seemed very complicated to me, mainly because there were so many inputs to it and you never really knew if you’ve set them correctly. …

Tarjan’s Off-line Lowest Common Ancestor Algorithm is an interesting application of the disjoint set structure for optimizing the performance of determining the lowest common ancestor(LCA) of two nodes within a tree, which also involves concepts such as caching and recursion. …