Skip to content

ann

sgp.models.ann.ANN

Bases: PredictionBase

Artificial Neural Network (ANN) model.

sgp.models.ann.PredictionBase

Bases: HashableBaseModelIO

Base class for prediction models.

sgp.models.ann.PredictionBase.predict abstractmethod

predict(**inputs: float) -> Dict[str, float | HashableBaseModelIO]

Predict the output from the input.

sgp.models.ann.hashkey

hashkey(*args, **kwargs)

Return a cache key for the specified hashable arguments, convert non-hashable arguments to hashable ones.

sgp.models.ann.timing

timing(func: Callable = None, *, target: Callable[[str], Any] = print)

Print the time taken for a function to execute.

PARAMETER DESCRIPTION
func

Function to be timed, by default None

TYPE: Callable DEFAULT: None

target

Function to print the timing information, by default print

TYPE: Callable[[str], Any] DEFAULT: print