def train features model = Hash.new(1) features.each {|f| model[f] += 1 } return model end