Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
Statistic_test Class Reference

Description

Test:
verifies the proper working of statistic helper functions.
  • calculate mean and standard derivation
  • one-dimensional linear regression
See also
DataCSV_test.hpp
statistic.hpp

Definition at line 51 of file statistic-test.cpp.

Private Member Functions

void run (Arg)
 
void demonstrate_DataSpan ()
 
void check_baseStatistics ()
 
void check_wightedLinearRegression ()
 
void check_TimeSeriesLinearRegression ()
 

Member Function Documentation

◆ run()

void run ( Arg  )
inlineprivate

Definition at line 54 of file statistic-test.cpp.

References Statistic_test::check_baseStatistics(), Statistic_test::check_TimeSeriesLinearRegression(), Statistic_test::check_wightedLinearRegression(), and Statistic_test::demonstrate_DataSpan().

+ Here is the call graph for this function:

◆ demonstrate_DataSpan()

void demonstrate_DataSpan ( )
inlineprivate
Test:
a simplified preview on C++20 ranges

Definition at line 66 of file statistic-test.cpp.

References lib::explore(), util::join(), and VERIFY_ERROR.

Referenced by Statistic_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ check_baseStatistics()

void check_baseStatistics ( )
inlineprivate
Test:
helpers to calculate mean and standard derivation

Definition at line 95 of file statistic-test.cpp.

References lib::stat::average(), lib::stat::averageLastN(), DataSpan< D >::begin(), lib::stat::lastN(), lib::stat::sdev(), and DataSpan< D >::size().

Referenced by Statistic_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ check_wightedLinearRegression()

void check_wightedLinearRegression ( )
inlineprivate
Test:
attribute a weight to each data point going into linear regression
  • using a simple scenario with three points
  • a line with gradients would run through the end points (1,1) ⟶ (5,5)
  • but we have a middle point, offset by -2 and with double weight
  • thus the regression line is overall shifted by -1
  • standard derivation is √3 and correlation 81% (both plausible and manually checked

Definition at line 128 of file statistic-test.cpp.

References lib::stat::computeLinearRegression(), util::join(), and lib::stat::sdev().

Referenced by Statistic_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ check_TimeSeriesLinearRegression()

void check_TimeSeriesLinearRegression ( )
inlineprivate
Test:
regression over a series of measurement data
  • use greater mount of data generated with randomness
  • actually a power function is hidden in the data

Definition at line 157 of file statistic-test.cpp.

References lib::stat::computeTimeSeriesLinearRegression(), and lib::ranRange().

Referenced by Statistic_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:
+ Inheritance diagram for Statistic_test:
+ Collaboration diagram for Statistic_test:

The documentation for this class was generated from the following file: