Skip to content

PredictionError

Bases: Exception

Raised when an error occurred while prediction a target vector using a model.

Parameters:

Name Type Description Default
reason str

The reason for the error.

required
Source code in src/safeds/exceptions/_ml.py
class PredictionError(Exception):
    """
    Raised when an error occurred while prediction a target vector using a model.

    Parameters
    ----------
    reason: str
        The reason for the error.
    """

    def __init__(self, reason: str):
        super().__init__(f"Error occurred while predicting: {reason}")

__init__(reason)

Source code in src/safeds/exceptions/_ml.py
def __init__(self, reason: str):
    super().__init__(f"Error occurred while predicting: {reason}")