Statistics for Weakly Supervised Learning Algorithms and an Application to Electromyography