Data science - Revision 2

since you're expecting cohorts to be an instance variable, it might help to declare it as an attr_accessor, then the rest of the invocations of @cohorts in this class could be changed to cohorts (implicit self)