On learning agent-based models from data