Skip to content

NotFittedError

Module: strata.utils • Kind: struct • Traits: Copyable, Movable, Writable
Source: strata/exceptions/errors.mojo

struct NotFittedError(Copyable, Movable, Writable)
from strata.utils import NotFittedError

Exception raised when an estimator is used before calling fit.


Method Description
NotFittedError.error() Create a formatted NotFittedError message.
NotFittedError.write_to() Format a human-readable string representation to a writer.

def error(estimator_name: String, msg: String = "") -> Error

Create a formatted NotFittedError message.

Parameter Type Description
estimator_name String —
msg String —

Returns: Error


def write_to(self, mut writer: Some[Writer])

Format a human-readable string representation to a writer.