# Posts by Category

## Deriving and implementing LDA

In this post, I will derive and implement Linear Discriminant Analysis (LDA). See also chapter 4.3 in [1].

## Avoiding underflows in Gaussian Naive Bayes

There are mainly two ways to avoid numerical instability when implementing Gaussian Naive Bayes (GNB). Either one applies the log-sum-exp trick or one takes ...

## Calculating the hard-margin SVM by hand

In this blog post, I will show how to calculate the hard-margin SVM by hand. If you are interested in a computational solution, refer to my last post.

## Geometry of hard-margin SVM and Optimization

In this blog post, I will give a geometric interpretation of hard-margin SVM and solve the corresponding optimization problem using quadratic programming. Se...

## Comparing Random Forest and Bagging

I recently read an interesting paper on Bagging [1]. The researchers compared Bagging and Random Subspace (RS) with Random Forest (RF). Their results were th...

## Stacking Best Practices

Stacking is a popular ensemble method in data competitions, but general guidelines are nowhere to be found. Most articles just describe how Stacking works.

## How to find and combine ML algorithms to improve your score

In this post, I will first explain how to find the best ML algorithms for a data set using some simple math. Then I will introduce a way to combine multiple ...

## Time series classification with images and 2D CNNs

There are many methods to classify time series using neural networks. This blog post will mainly focus on two-dimensional CNNs and how 1D series can be repre...

## Object detection from scratch

In this post, I will implement a simple object detector in Keras based on the three YOLO papers [1][2][3]. The complete code can be obtained from here.

## Closed-form expression for neural network

In this blog post, I will derive a closed-form expression for a simple feed-forward neural network.

## Detecting objects using segmentation

To find objects in images, one normally predicts four values: two coordinates, width and height. However, it is also possible to formulate object detection a...

## Losses for Image Segmentation

In this post, I will implement some of the most common losses for image segmentation in Keras/TensorFlow. I will only consider the case of two classes (i.e. ...

## Object detection from scratch

In this post, I will implement a simple object detector in Keras based on the three YOLO papers [1][2][3]. The complete code can be obtained from here.

## Detecting objects using segmentation

To find objects in images, one normally predicts four values: two coordinates, width and height. However, it is also possible to formulate object detection a...

## Losses for Image Segmentation

In this post, I will implement some of the most common losses for image segmentation in Keras/TensorFlow. I will only consider the case of two classes (i.e. ...

## k-means clustering for anchor boxes

In this blog post, I will explain how k-means clustering can be implemented to determine anchor boxes for object detection. Anchor boxes are used in object d...

## Calculating the hard-margin SVM by hand

In this blog post, I will show how to calculate the hard-margin SVM by hand. If you are interested in a computational solution, refer to my last post.

## Geometry of hard-margin SVM and Optimization

In this blog post, I will give a geometric interpretation of hard-margin SVM and solve the corresponding optimization problem using quadratic programming. Se...

## Solving LPs graphically and by brute-force using Python

In order to understand better the properties of Linear Programs (LP), it can be helpful to look at some naive methods. In this post, I will solve the followi...

## n-gram, entropy and entropy rate

n-gram models find use in many areas of computer science, but are often only explained in the context of natural language processing (NLP). In this post, I w...

## Portuguese Lemmatizers

In this post, I will compare some lemmatizers for Portuguese. In order to do the comparison, I downloaded subtitles from various television programs. The sen...