Skip to content

FittingWithChoiceError

Bases: Exception

Raised when a model is fitted with a choice object as a parameter.

Source code in src/safeds/exceptions/_ml.py
class FittingWithChoiceError(Exception):
    """Raised when a model is fitted with a choice object as a parameter."""

    def __init__(self) -> None:
        super().__init__(
            "Error occurred while fitting: Trying to fit with a Choice Parameter. Please use "
            "fit_by_exhaustive_search() instead.",
        )