Check whether the estimator’s fit method supports the given parameter.
An estimator to inspect.
The searched parameter.
Whether the parameter was found to be a named parameter of the estimator’s fit method.
>>> from sklearn.svm import SVC >>> from sklearn.utils.validation import has_fit_parameter >>> has_fit_parameter(SVC(), "sample_weight") True
© 2007–2025 The scikit-learn developers
Licensed under the 3-clause BSD License.
https://scikit-learn.org/1.6/modules/generated/sklearn.utils.validation.has_fit_parameter.html