Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
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: