def predict_labels(model, data):
    """Run the model on each element of a dataset and produce a list of
    probabilistic predictions (note: not logits). Assumes a binary
    classifier. Does not apply a threshold.

    Args:
        model: a tensorflow or sklearn model capable of prediction.
        data: an array of elements that the model can use to make
            predictions.

    Returns:
        A Python list of probabilistic predictions.
    """

    # Different models predict in different ways
    if "keras" in str(type(model)):
        pred_prob_labels = map(lambda l: l[0], model.predict(data))
    else:
        pred_prob_labels = map(lambda l: l[1], model.predict_proba(data))

    return list(pred_prob_labels)