Download the PHP package pforret/estimator without Composer
On this page you can find all versions of the php package pforret/estimator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download pforret/estimator
More information about pforret/estimator
Files in pforret/estimator
Download pforret/estimator
More information about pforret/estimator
Files in pforret/estimator
Vendor pforret
Package estimator
Short Description PHP package to help with statistic estimation (extrapolation) based on historic reference data
License MIT
Homepage https://github.com/pforret/estimator
Package estimator
Short Description PHP package to help with statistic estimation (extrapolation) based on historic reference data
License MIT
Homepage https://github.com/pforret/estimator
Please rate this library. Is it a good library?
Informations about the package estimator
Historical Estimator / Extrapolator
Github:
Package to help estimate stats based on partial data and historic averages.
Example:
- given the average rainfall in December in 20 cities for the last 5 years (e.g.86 mm for Brussels, ...)
- when I have the rainfall this year for 15 of those cities,
- estimate the other 5 cities
Installation
You can install the package via composer:
Usage
$evaluation = $est->evaluate_partials($partials);
// references = values set with set_references
[references_count] => 4
[references_maximum] => 25
[references_mean] => 25
[references_median] => 25
[references_minimum] => 25
[references_sum] => 100
// partials = values specified with estimate_from_partials
[partials_maximum] => 28
[partials_mean] => 26
[partials_median] => 25
[partials_minimum] => 25
[partials_multiplier] => 1.04
[partials_sum] => 78
// found = subset of references, matching with partials keys
[found_count] => 3
[found_count_fraction] => 0.75
[found_mean] => 25
[found_sum] => 75
[found_sum_fraction] => 0.75
// stat = statistic evaulation of estimate/extrapolation
[stat_confidence] => 74.913
[stat_deviation] => 3
Example
$references=[
"John" => 100,
"Kevin" => 120,
"Sarah" => 100,
"Vince" => 100,
];
$est = new Estimator();
$est->set_references($references);
$partials=[
"John" => 120,
"Kevin" => 150,
// "Sarah" is to be estimated
"Vince" => 175,
];
$estimation=$est->estimate_from_partials();
/*
[John] => 120
[Kevin] => 150
[Vince] => 175
[Sarah] => 139 <<< estimation
*/
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email author_email instead of using the issue tracker.
Credits
- Peter Forret
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of estimator with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.4 | ^8.0
The package pforret/estimator contains the following files
Loading the files please wait ....