MCPcopy
hub / github.com/scikit-learn/scikit-learn / _method_name

Method _method_name

sklearn/ensemble/_stacking.py:141–153  ·  view source on GitHub ↗
(name, estimator, method)

Source from the content-addressed store, hash-verified

139
140 @staticmethod
141 def _method_name(name, estimator, method):
142 if estimator == "drop":
143 return None
144 if method == "auto":
145 method = ["predict_proba", "decision_function", "predict"]
146 try:
147 method_name = _check_response_method(estimator, method).__name__
148 except AttributeError as e:
149 raise ValueError(
150 f"Underlying estimator {name} does not implement the method {method}."
151 ) from e
152
153 return method_name
154
155 @_fit_context(
156 # estimators in Stacking*.estimators are not validated yet

Callers 1

fitMethod · 0.95

Calls 1

_check_response_methodFunction · 0.90

Tested by

no test coverage detected