Closed Kraysent closed 2 years ago
It would be handy to log the parameters of the fit so this ability should probably be a part of tasks module rather than visualizer one.
Possible approaches:
fit
with parameters function_type
, error
and so on. The main question is what to do with the result. Handler may put it into the logger
by itself but this would make it impossible to visualize immediately. fit
property is set, the result of task is sibstituted with the fitted function on the exact same points. This is better than previous point because it makes it possible to visualize the fit. The disadvantage of the approach is that if one wants to draw both fit and initial data, they need to recalculate task once again. Though this is the price for flexibility of approach. middleware
property of the task. When user wants to modify the output data of the task, they create middleware
object that accepts data and outputs data in the same (or not?) format. snaphot_hander
, middleware
, handler
parts of the task. Requires #104
Now fitting is as easy as creating action_after
for fitting and modifiing the data there.
Let user fit the graph on the fly with arbitrary (or not) function.