Learning shapelets