How to use the temci.utils.number.fnumber function in temci

To help you get started, we’ve selected a few temci examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github parttimenerd / temci / temci / report / report.py View on Github external
                "func": lambda x: fnumber(x.max()),
                "format": self._float_format,
github parttimenerd / temci / temci / report / report.py View on Github external
cell = None
                pair = self.stats.get_pair(i, j)
                rel_diff = None
                if property is None:
                    popover.content = r"""
                        Geometric mean of the first means relative to the second means:
                        \[\sqrt[\|properties\|]{
                        \prod_{p \in \text{properties}}
                        \frac{\overline{\text{first[p]}}}{
                            \overline{\text{second[p]}}}}\]
                        <p>Using the more widely known arithmetic mean would be like
                        <a href="http://ece.uprm.edu/~nayda/Courses/Icom6115F06/Papers/paper4.pdf?origin=publication_detail">
                        lying</a>.</p>
                        <p>The geometric standard deviation is <b>%s</b></p>.
                    """ % self._percent_format.format(pair.first_rel_to_second_std())
                    rel_diff = fnumber(pair.first_rel_to_second(), rel_deviation=pair.first_rel_to_second_std() - 1, is_percent=True)
                    popover.trigger = "hover click"
                else:
                    pair = pair[property]
                    popover.content="""First mean relative to the second mean:
                    \\begin{align}
                        &amp; \\frac{\\overline{\\text{first[%s]}}}{\\overline{\\text{second[%s]}}} \\\\
                        &amp;= \\frac{%5.4f}{%5.4f}
                    \\end{align}
                    <p>The maximum standard deviation of both benchmarks relative to the mean of the second one is <b>%s</b>.</p>
                    """ % (property, property, pair.first.mean(), pair.second.mean(),
                           self._percent_format.format(pair.max_std_dev() / pair.second.mean()))
                    rel_diff = FNumber(pair.first_rel_to_second(), rel_deviation=pair.max_std_dev() / pair.second.mean(), is_percent=True)
                cell = _Cell(self, content=str(rel_diff), popover=popover, color_class_obj=pair, show_click_on_info=True)
                cell.modal_id = self._short_summary_modal(pair)
                table[i, j] = cell
        return table
github parttimenerd / temci / temci / report / report.py View on Github external
                "func": lambda x: fnumber(x.mean_diff(), abs_deviation=x.max_std_dev()),
                "format": self._float_format
github parttimenerd / temci / temci / report / report.py View on Github external
                "func": lambda x: fnumber(x.std_dev_per_mean(), rel_deviation=x.sem() / (x.mean() ** 2),
                                          is_percent=True),
                "format": self._percent_format,
github parttimenerd / temci / temci / report / report.py View on Github external
                "func": lambda x: fnumber(x.mean_diff_ci(self.misc["alpha"])[1]),
                "format": self._float_format,
github parttimenerd / temci / temci / report / report.py View on Github external
                "func": lambda x: fnumber(x.mean_diff_per_mean(), abs_deviation=x.max_std_dev() / x.first.mean(),
                                          is_percent=True),
                "format": self._percent_format,
github parttimenerd / temci / temci / report / report.py View on Github external
                "func": lambda x: fnumber((x.first.min() - x.second.min()) / x.max_std_dev(), is_percent=True),
                "format": self._percent_format,
github parttimenerd / temci / temci / report / report.py View on Github external
                "func": lambda x: fnumber(x.sem(), abs_deviation=x.sem() / math.sqrt(x.observations())),
                "format": self._float_format,
github parttimenerd / temci / temci / report / report.py View on Github external
                "func": lambda x: fnumber(x.mean_diff(), abs_deviation=x.max_std_dev()),
                "format": self._float_format
github parttimenerd / temci / temci / report / report.py View on Github external
                "func": lambda x: fnumber(x.mean_diff_per_mean(), #rel_deviation=x.max_rel_std_dev(),
                                          is_percent=True),
                "format": self._percent_format,