flowmachine.core.model¶
Source: flowmachine/core/model.py
Model is an abstract base class for models - features which are calculated outside of the database.
In addition, it provides a decorator - model_result, which should be used with the run
method of a model. This will check for cached results for the run parameters, and return the cache in preference to running the model.
Class Model¶
Model()
Abstract base class for models.
Methods¶
run¶
run(self, *args, **kwargs)
Method which runs the model.
Returns¶
flowmachine.core.model_result.ModelResult
model_result¶
model_result(f)
A decorator which creates a ModelResult
object, and handles checking if the results of run
are cached, returns them if so and converts the DataFrame returned by run
into a ModelResult
.
Parameters¶
-
f
:function
run function to wrap
Returns¶
function