Data::EventStream::Statistics::Discrete - basic statistical functions for the sample
This document describes Data::EventStream::Statistics::Discrete version 0.13
use Data::EventStream::Statistics::Discrete; my $stat = Data::EventStream::Statistics::Discrete->new( value_sub => \&event_value, ); $ev_stream->add_aggregator($stat, %params);
Module implements aggregator that calculates basic statistical functions for data set in aggregators' window.
Create a new aggregator. Requires value_sub parameter which defines subroutine that returns numeric value for an event.
Current number of events in the window
Sum of all events in the window
Average value for the event
Variance of the data. Division by n-1 is used
Standard deviation of the data. Division by n-1 is used
Invoked when event enters window
Invoked when event leaves window
Invoked when aggregator is reset
Invoked when window is updated
To install Data::EventStream, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::EventStream
CPAN shell
perl -MCPAN -e shell install Data::EventStream
For more information on module installation, please visit the detailed CPAN module installation guide.