def is_probabilistic(estimator):
    """
    Returns True if the given estimator returns a y_score for it's decision
    function, e.g. has ``predict_proba`` or ``decision_function`` methods.

    Parameters
    ----------
    estimator : class or instance
        The object to test if is probabilistic, especially a Scikit-Learn
        estimator or Yellowbrick visualizer.
    """
    return any([hasattr(estimator, 'predict_proba'), hasattr(estimator,
        'decision_function')])
