in src/mozanalysis/frequentist_stats/sample_size.py [0:0]
def plot_results(self, result_name: str = "sample_size_per_branch"):
"""plots the outputs of the sampling methods
Args:
result_name (str): sample size method output to plot.
Defaults to sample_size_per_branch
"""
nice_metric_map = {
el.name: (
el.friendly_name
if hasattr(el, "friendly_name")
else self.make_friendly_name(el.name)
)
for el in self._metrics
}
nice_result = self.make_friendly_name(result_name)
df = self.dataframe.rename(index=nice_metric_map)
df[result_name].plot(kind="bar")
plt.ylabel(nice_result)
plt.xlabel("Metric")
plt.show(block=False)