PHP code example of magaras / pstats

1. Go to this page and download the library: Download magaras/pstats library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

magaras / pstats example snippets


Basic::mean($data);

Basic::median($data);

Basic::mode($data);

Basic::range($data);

Basic::percentageChange($start_value, $end_value);

Basic::percentageDifference($start_value, $end_value);

Error::absoluteError(0, 0);

Error::mae($actuals, $predictions);

Error::mse($actuals, $predictions);

Error::variance($data, true);
Error::variance($data, false);

Error::std($data);

$frequency_classes = Frequency::frequencyContinuous($data);

$frequency_classes[$i]->absolute_frequency

$frequency_classes[$i]->relative_frequency

$frequency_classes[$i]->cumulative_frequency

$frequency_classes = Frequency::frequencyDiscrete($data);

$frequency_classes[$i]->absolute_frequency

$frequency_classes[$i]->relative_frequency

$frequency_classes[$i]->cumulative_frequency

MovingAverage::simpleMovingAverage($moving_average_value, $data);

MovingAverage::exponentialMovingAverage(moving_average_value, $data);

Outliers::outlierAroundMean($data);

Outliers::outlierAroundMedian($data);