Algorithm

todo intro text

class algomancy_scenario.basealgorithm.BaseAlgorithm(name, params)[source]

Bases: ABC

result_class

alias of ScenarioResult

property params
property data_params: BaseParameterSet

The data parameters declared by the input data source for the current run.

Defaults to EmptyParameters(). The scenario calls set_data_params with the user-supplied values before run().

set_data_params(data_params)[source]
property get_progress: float
property name: str
set_logger(logger)[source]
set_progress(progress)[source]
is_complete()[source]
to_dict()[source]
healthcheck()[source]
abstractmethod static initialize_parameters()[source]

Initializes parameters for the derived Algorithm, which is necessary for the GUI logic. It should simply return a default object of the associated AlgorithmParameters class.

Example

>>> @staticmethod
>>> def initialize_parameters() -> ExampleAlgorithmParams:
...    return ExampleAlgorithmParams()
Raises:

NotImplementedError – If the method is not overridden.

Returns:

The initialized set of parameters, derived

from the BaseAlgorithmParameters class.

Return type:

BASE_PARAMS_BOUND

abstractmethod run(data)[source]