afe.driver.statistic ==================== .. py:module:: afe.driver.statistic .. autoapi-nested-parse:: Analysis of statistics on tensors. Classes ------- .. autoapisummary:: afe.driver.statistic.StatisticInstance afe.driver.statistic.Statistic Module Contents --------------- .. py:class:: StatisticInstance A collector of statistics on a stream of inputs. With an instance of the class, inputs are supplied repeatedly by calling update, then the computed result is read by calling finish. .. py:method:: update(x: _I) -> None :abstractmethod: .. py:method:: finish() -> _O :abstractmethod: .. py:class:: Statistic A method of computing a property over a stream of inputs. The property is normally a reduction, e.g., the average of the mean squared errors of all inputs. .. py:attribute:: initialize :type: Callable[[], _S] .. py:attribute:: update :type: Callable[[_S, _I], None] .. py:attribute:: finish :type: Callable[[_S], _O] .. py:method:: instantiate_type() -> Type[StatisticInstance[_I, _O]] .. py:method:: comap(f: Callable[[_A], _I]) -> Statistic[_A, _O] Map a function over the input stream. :param f: Function to apply to inputs :return: Transformed Statistic .. py:method:: map(f: Callable[[_O], _A]) -> Statistic[_I, _A] Map a function over the output. :param f: Function to apply to output :return: Transformed Statistic