Federico Lebrón

Spectral clustering

Categories: Programming, Computer Science

I've been on hiatus for a while due to work at and studies, but I thought I'd take a quick break and post about some interesting stuff I've been playing around with, and that's spectral clustering. I'll try to assume no previous knowledge of clustering data, so I'll give a brief introduction to that.

The post goes into the k-means clustering algorithm, spectral clustering, and a C++ implementation of both.

A categorical view of covariance and contravariance in C++

Categories: Programming, Mathematics, Computer Science

I had often heard the expression "C++ now has covariant return types". To be honest, I vaguely knew covariance was a mathematical term, and I was also pretty sure it had nothing to do with statistical covariance.

Now that I understand a bit more about category theory, I feel I can clarify some things about this usage of the word "covariance" in programming languages. Surprisingly, it is not a terrible bastardization of the mathematical term, as C++ and Java have done to the word "functor".