/correlator

PHP Correlation algorithm implementations

Primary LanguagePHPMIT LicenseMIT

Correlator

v0.1 - early alpha version; rewriting from aged codebase.

Introduction

Primarily intended to find the most influential factor in determining the success of multiple measurable events.

Assumes the array set when construction contains the "scores" (reflecting the relative success of something expressed as an interval or ratio set), whereas the array compared against contains the "influence factor". The method chose depends on the characteristics of influence factor.

Installation

  • Requires PHP 5.3 or above.
  • No dependencies.
  • Just require and use.

Usage example

require_once 'Correlator.php';
$scores = [1, 2, 3, 4, 5];
$factor = [1, 2, 9, 4, 4];

$Correlator = new Correlator/Correlator($scores);
$rho = $Correlator->getPearsonsRPopulation($factor);

echo $rho;

Further reading

Future directions