-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error Bars for plotting measures #124
Comments
Hi @wingedRuslan! This looks great. Having just had a google around, I actually think showing the variance using the 95% confidence interval makes most sense (especially as for this plot the variance is so small!) I think I'd code this up using the seaborn barplot function: https://seaborn.pydata.org/generated/seaborn.barplot.html. By default it will add the 95% CI error bars. The work therefore is in building a data frame with the x and y values that you need. I don't have time to open up jupyter etc to figure out the code, but if you structure the data frame so that you can run
The more I stare at this the more I wonder if the dataframe will have to be weirdly long to actually get the seaborn function working....so it might be better to go with something similar to what you've got above. I can take a look tomorrow afternoon though if you have a bash 😄 |
Here's a formula for the 95% confidence interval if you do stay with the code you've added at the top of this issue: 0.96SD to 1.05SD (https://www.graphpad.com/guides/prism/7/statistics/stat_confidence_interval_of_a_stand.htm?toc=0&printWindow) |
Hi @KirstieJane Thank you for tips! This is the plot I have when there are only 5 random graphs: By default What do you think about the figure? |
This looks great!! I don’t like the colours (I like the grey for the random graphs) but the plot looks fantastic! |
Oh! And one other thing. I think the ratio can be a bit “squarer”. Change the figsize option to make the bigger number (the x dimension) a little smaller. |
@KirstieJane I did not test for random_graphs = 1000 (or at least 100), as my system froze 😕 Sure, I will change colors and make figure squarer :) |
I've made the plotting function to leverage seaborn capabilities. 100 random graphs - 5 mins @KirstieJane What is your opinion on that? |
@wingedRuslan can you split the timings into the "making random graphs", "network measures" and plotting steps? I suspect that 1 and 2 take a while, but the plotting should be very quick |
(plot looks great btw!) |
@KirstieJane ohhhhh, yesterday was a bad day for me in terms of attention, so many small mistakes you are right about time complexities for different operations! If we pass GraphBundle with already calculated measures, it is less than 1 sec for 100 random graphs. yeah, finally I addressed all the comments and ready to submit my commits to PR #121 |
Before adding error bars to the plot created by
plot_network_measures
function, I want to make sure that I create error bars correctly. (so that I will not need to change again code)Here is an example of plotting error bar for just 1 measure:
So I take the mean value of random measures and then calculate the standard deviation of the random values.
While plotting I pass the mean value as height and standard deviation as an errorbar.
Is that the right way?
The text was updated successfully, but these errors were encountered: