def evaluate_mva(df, mva):
    """
    Evaluate the response of a trained classifier.

    Parameters
    ----------
    df : DataFrame, shape= [n_training_samples, n_features]
        DataFrame containing features.
    mva
        Trained classifier.

    Returns
    -------
    Series or array
        Classifier response values corresponding to each entry in df.

    Notes
    -----
    The classifier response values are taken from the mva object's
    predict_proba method. By default this is passed the df DataFrame directly
    but in some cases this is not supported and df is passed as a numpy array.
    In the former case this function returns a Pandas Series and in the latter
    a 1D array. This fallback has only been tested for Keras classifiers.
    """

    # Keras doesn't like DataFrames, error thrown depends on Keras version
    try:
        return mva.predict_proba(df)[:, 1]
    except (KeyError, UnboundLocalError):
        return mva.predict_proba(df.as_matrix())[:, 1]