Get rid of sklearn dependency