Environment-adaptive learning from demonstration for proactive assistance in human-robot collaborative tasks