How should we cite a MOOC?
In many fields, it is common practice to look up the original publication in which a concept/algorithm was introduced, and to cite that. Many courses will give some literature pointers to help you with the search for it.

The reason is that citations are also meant to distribute credit for novel findings, so in this way, the researchers who came up with the algorithm get the credit.