Theory and Algorithms for Shapelet-based Multiple-Instance Learning