AstraZeneca / judgyprophet

Forecasting for knowable future events using Bayesian informative priors (forecasting with judgmental-adjustment).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unspecified argument used in judgyprophet.fit()

Andrew47658 opened this issue · comments

The docstring of judgyprophet.fit() states that the dict array fed into 'trend_events' argument only needs three values per dict:

:param trend_events: A list of dictionaries. Each dict should have the following entries
            - 'index' the start index of the event (i.e. index = i assumes the start of the event
                is at location actuals[i]). The index should be of the same type as the actuals index.
            - 'm0' the estimated gradient increase following the event
            - 'gamma' (Optional) the damping to use for the trend. This is a float between 0 and 1.
                It's not recommended to be below 0.8 and must be 0 > gamma <= 1.
                If gamma is missing from the dict, or gamma = 1, a linear trend is used (i.e. no damping).

But it actually needs 4 to work - the missing one being 'name'.

The only need for this value currently is logging purposes (lines 1059 and 1085). Perhaps remove this argument from the logging, or add it as a forth key in the dictionary in the docstring?

Note the same is also true for the "level_event" dicts (lines 988 & 1004)

Perhaps remove this argument from the logging, or add it as a forth key in the dictionary in the docstring?

The second of these would actually be better - including the name is helpful in the logging ('EFL255' etc are names of events):
Screenshot 2022-10-14 at 15 12 45