(name, estimator, method)
| 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 |
no test coverage detected