sklearn.utils.validation.has_fit_parameter(estimator, parameter)
[source]
Checks whether the estimator’s fit method supports the given parameter.
Parameters: |
|
---|---|
Returns: |
|
>>> from sklearn.svm import SVC >>> has_fit_parameter(SVC(), "sample_weight") True
© 2007–2018 The scikit-learn developers
Licensed under the 3-clause BSD License.
http://scikit-learn.org/stable/modules/generated/sklearn.utils.validation.has_fit_parameter.html