Add .summary() method
kevindavisross opened this issue · 6 comments
Currently we have .tabulate(), .plot(), .mean(), etc separately but it would be nice to have a .summary() option that displays all the output in some format. It would need to work like .plot()
X.sim(10000).summary()
would return mean, sd, a plot (histogram or impulse), and if discrete a frequency table, if continuous a table of quantiles
(X & Y).sim(10000).summary()
would return means, sds, correlation, scatter (or other plots we add).
@hliu26 see the previous comment on this issue for some notes on the .summary() method to add.
I think one of your tasks is to investigate the status of this pull request, which never got merged in. This implements quantile
functions, among other things. Try that first, and then you should be able to access it for summary
.
Yes, the five number summary would be good.
Please also add a little formatting to the summary statistics: format a table like tabulate
does, 'Standard deviation' instead of 'Std'.
Ah, I looked at the code in that pull request and I don't think I can use any of those. Those functions are in math.py and I didn't use any of those to create my summary
. I used mean
, sd
from RVResults object. I need to create a quantile
inside RVResults to use for summary
. I'm not sure what those functions in math.py do since I saw some "same name" functions in RVResults and they do not use any of the math.py functions...
@hayate0304: I think the other pull request can be merged as in; I just asked @dlsun to confirm.
If yes, then this will affect your summary code. The other pull request implements all the functions you would need (min, max, quantile) in both RV space and simulation space. I am forwarding you an email that contains some information about RV space versus simulation space, The reason why you see some functions in both math.py and in RVResults is because of these two separate spaces: simulation space vs RV space. (The reason why you see some functions only in one place and not the other is just because we never added them.) The pull request should have the functions you need in RVResults already. So we don't want to define them twice, which might require modifications to your code. Hold off on further work on summary until @dlsun looks at the previous pull request.
Aaaaa, I got it, I didn't look at the results.py of that pull request yesterday. Their results.py looks good. Thanks professor.