short implementations of well known ML algorithms