rewrite sklearn examples