eval.py
def meanF1scorer(model, x, y):
  """
  A scoring function for mean F1-score with the right signature 
  to use as the 'scoring' parameter in sklearn.metric.cross_val_score.
  
  Params:
    model - the model to use for prediction
    x - features to use for prediction
    y - ground truth labels for the examples in x
        a numpy 0-1 array of size (# instances) x (# classes)
    
  Returns:
    the mean F1-score for the predictions on x
  """
  pred = model.predict(x)
  return meanF1array(y, pred)

  A scoring function for mean F1-score with the right signature 
  to use as the 'scoring' parameter in sklearn.metric.cross_val_score.
  
  Params:
    model - the model to use for prediction
    x - features to use for prediction
    y - ground truth labels for the examples in x
        a numpy 0-1 array of size (# instances) x (# classes)
    
  Returns:
    the mean F1-score for the predictions on x
  
A scoring function for mean F1-score with the right signature
to use as the 'scoring' parameter in sklearn.metric.cross_val_score.

the model to use for prediction
x - features to use for prediction
y - ground truth labels for the examples in x
a numpy 0-1 array of size (# instances) x (# classes)

the mean F1-score for the predictions on x
A scoring function for mean F1 - score with the right signature to use as the ' scoring ' parameter in sklearn . metric . cross_val_score . the model to use for prediction x - features to use for prediction y - ground truth labels for the examples in x a numpy 0 - 1 array of size ( # instances ) x ( # classes ) the mean F1 - score for the predictions on x
def meanF1scorer(model, x, y):
  pred = model.predict(x)
  return meanF1array(y, pred)
def meanF1scorer ( model , x , y ) : pred = model . predict ( x ) return meanF1array ( y , pred )
A scoring function for mean F1-score with the right signature
to use as the 'scoring' parameter in sklearn.metric.cross_val_score.
A scoring function for mean F1 - score with the right signature to use as the ' scoring ' parameter in sklearn . metric . cross_val_score .
"""
  A scoring function for mean F1-score with the right signature 
  to use as the 'scoring' parameter in sklearn.metric.cross_val_score.
  
  Params:
    model - the model to use for prediction
    x - features to use for prediction
    y - ground truth labels for the examples in x
        a numpy 0-1 array of size (# instances) x (# classes)
    
  Returns:
    the mean F1-score for the predictions on x
  """
model
x
y