Robotic learning from demonstration of therapist's time-varying assistance to a patient in trajectory-following tasks