ОшибкаNotFittedError
- исключениеsklearn.exceptions.NotFittedError[source]
-
Класс исключений для повышения, если оценщик используется до подгонки.
Этот класс наследуется как от ValueError, так и от AttributeError для помощи в обработке исключений и обратной совместимости.
Примеры
>>> from sklearn.svm import LinearSVC >>> from sklearn.exceptions import NotFittedError >>> try: ... LinearSVC().predict([[1, 2], [2, 3], [3, 4]]) ... except NotFittedError as e: ... print(repr(e)) NotFittedError("This LinearSVC instance is not fitted yet. Call 'fit' with appropriate arguments before using this estimator."...)Изменено в версии 0.18: Перемещено из sklearn.utils.validation.
© 2007–2025 The scikit-learn developers
Licensed under the 3-clause BSD License.
https://scikit-learn.org/1.6/modules/generated/sklearn.exceptions.NotFittedError.html