Documentation

Trend
in package

Table of Contents

Constants

TREND_BEST_FIT  = 'Bestfit'
TREND_BEST_FIT_NO_POLY  = 'Bestfit_no_Polynomials'
TREND_EXPONENTIAL  = 'Exponential'
TREND_LINEAR  = 'Linear'
TREND_LOGARITHMIC  = 'Logarithmic'
TREND_POLYNOMIAL_2  = 'Polynomial_2'
TREND_POLYNOMIAL_3  = 'Polynomial_3'
TREND_POLYNOMIAL_4  = 'Polynomial_4'
TREND_POLYNOMIAL_5  = 'Polynomial_5'
TREND_POLYNOMIAL_6  = 'Polynomial_6'
TREND_POWER  = 'Power'

Properties

$trendCache  : array<string|int, BestFit>
Cached results for each method when trying to identify which provides the best fit.
$trendTypePolynomialOrders  : array<string|int, string>
Names of the best-fit Trend polynomial orders.
$trendTypes  : array<string|int, string>
Names of the best-fit Trend analysis methods.

Methods

calculate()  : mixed

Constants

TREND_BEST_FIT

public mixed TREND_BEST_FIT = 'Bestfit'

TREND_BEST_FIT_NO_POLY

public mixed TREND_BEST_FIT_NO_POLY = 'Bestfit_no_Polynomials'

TREND_EXPONENTIAL

public mixed TREND_EXPONENTIAL = 'Exponential'

TREND_LINEAR

public mixed TREND_LINEAR = 'Linear'

TREND_LOGARITHMIC

public mixed TREND_LOGARITHMIC = 'Logarithmic'

TREND_POLYNOMIAL_2

public mixed TREND_POLYNOMIAL_2 = 'Polynomial_2'

TREND_POLYNOMIAL_3

public mixed TREND_POLYNOMIAL_3 = 'Polynomial_3'

TREND_POLYNOMIAL_4

public mixed TREND_POLYNOMIAL_4 = 'Polynomial_4'

TREND_POLYNOMIAL_5

public mixed TREND_POLYNOMIAL_5 = 'Polynomial_5'

TREND_POLYNOMIAL_6

public mixed TREND_POLYNOMIAL_6 = 'Polynomial_6'

TREND_POWER

public mixed TREND_POWER = 'Power'

Properties

$trendCache

Cached results for each method when trying to identify which provides the best fit.

private static array<string|int, BestFit> $trendCache = []

$trendTypePolynomialOrders

Names of the best-fit Trend polynomial orders.

private static array<string|int, string> $trendTypePolynomialOrders = [self::TREND_POLYNOMIAL_2, self::TREND_POLYNOMIAL_3, self::TREND_POLYNOMIAL_4, self::TREND_POLYNOMIAL_5, self::TREND_POLYNOMIAL_6]

$trendTypes

Names of the best-fit Trend analysis methods.

private static array<string|int, string> $trendTypes = [self::TREND_LINEAR, self::TREND_LOGARITHMIC, self::TREND_EXPONENTIAL, self::TREND_POWER]

Methods

calculate()

public static calculate([string $trendType = self::TREND_BEST_FIT ][, array<string|int, mixed> $yValues = [] ][, array<string|int, mixed> $xValues = [] ][, bool $const = true ]) : mixed
Parameters
$trendType : string = self::TREND_BEST_FIT
$yValues : array<string|int, mixed> = []
$xValues : array<string|int, mixed> = []
$const : bool = true

        
On this page

Search results