Theory and Algorithms for Shapelet-Based Multiple-Instance Learning