parameters: (name, Estimator)
docstring: Check that predict raises an exception in an unfitted estimator.
  
      Unfitted estimators should raise either AttributeError or ValueError.
      The specific exception type NotFittedError inherits from both and can
      therefore be adequately raised for that purpose.
docstring_summary: Check that predict raises an exception in an unfitted estimator.
docstring_tokens: Check that predict raises an exception in an unfitted estimator .
function: def check_estimators_unfitted(name, Estimator):
      """Check that predict raises an exception in an unfitted estimator.
  
      Unfitted estimators should raise either AttributeError or ValueError.
      The specific exception type NotFittedError inherits from both and can
      therefore be adequately raised for that purpose.
      """
  
      # Common test for Regressors as well as Classifiers
      X, y = _boston_subset()
  
      est = Estimator()
  
      msg = "fit"
      if hasattr(est, 'predict'):
          assert_raise_message((AttributeError, ValueError), msg,
                               est.predict, X)
  
      if hasattr(est, 'decision_function'):
          assert_raise_message((AttributeError, ValueError), msg,
                               est.decision_function, X)
  
      if hasattr(est, 'predict_proba'):
          assert_raise_message((AttributeError, ValueError), msg,
                               est.predict_proba, X)
  
      if hasattr(est, 'predict_log_proba'):
          assert_raise_message((AttributeError, ValueError), msg,
                               est.predict_log_proba, X)
function_tokens: def check_estimators_unfitted ( name , Estimator ) : # Common test for Regressors as well as Classifiers X , y = _boston_subset ( ) est = Estimator ( ) msg = "fit" if hasattr ( est , 'predict' ) : assert_raise_message ( ( AttributeError , ValueError ) , msg , est . predict , X ) if hasattr ( est , 'decision_function' ) : assert_raise_message ( ( AttributeError , ValueError ) , msg , est . decision_function , X ) if hasattr ( est , 'predict_proba' ) : assert_raise_message ( ( AttributeError , ValueError ) , msg , est . predict_proba , X ) if hasattr ( est , 'predict_log_proba' ) : assert_raise_message ( ( AttributeError , ValueError ) , msg , est . predict_log_proba , X )