Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
Phpml\Math\Statistic\Covariance Class Reference

Static Public Member Functions

static covarianceMatrix (array $data, ?array $means=null)
 Returns the covariance matrix of n-dimensional data.
 
static fromDataset (array $data, int $i, int $k, bool $sample=true, ?float $meanX=null, ?float $meanY=null)
 Calculates covariance of two dimensions, i and k in the given data.
 
static fromXYArrays (array $x, array $y, bool $sample=true, ?float $meanX=null, ?float $meanY=null)
 

Member Function Documentation

◆ covarianceMatrix()

static Phpml\Math\Statistic\Covariance::covarianceMatrix ( array $data,
?array $means = null )
static

Returns the covariance matrix of n-dimensional data.

Parameters
array | null$means

◆ fromDataset()

static Phpml\Math\Statistic\Covariance::fromDataset ( array $data,
int $i,
int $k,
bool $sample = true,
?float $meanX = null,
?float $meanY = null )
static

Calculates covariance of two dimensions, i and k in the given data.

Exceptions
InvalidArgumentException
Exception

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