Extracting numerical data
kloskas opened this issue · 4 comments
kloskas commented
Thanks for this package, it's awesome that covers multivariate units for fit instead of just the outcome variable! I just wanted to know how to get the actual gaps_plot, cv_result.plot, path_plot data instead of only graphs, they're useful visually but I wanted to check the cumulative effect of the treatment.
sdfordham commented
You need to use some private methods to get these
gaps_plot
: you can usesynth._gaps()
it will return a pandas series with the data pointspath_plot
: you can usesynth._synthetic()
it will return a pandas series with the data pointscv_result.plot
: you can use something like:
pd.Series(data=augsynth.cv_result.errors_mean, index=augsynth.cv_result.lambdas)
kloskas commented
Thanks, I only get the data until the treatment though... how can I see the projected post-treatment?
sdfordham commented
E.g. in the situation of the Basque paper, one might run
ser_1 = synth._gaps(time_period=range(1955, 1998))
ser_2 = synth._synthetic(time_period=range(1955, 1998))
kloskas commented
Great thanks!