PHPackages                             soandso/forecast-verifiability - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. soandso/forecast-verifiability

ActiveLibrary

soandso/forecast-verifiability
==============================

Weather forecast verifiability

0.1.1(6y ago)09GPL-2.0-or-laterPHPPHP ^7.0

Since Dec 14Pushed 6y ago1 watchersCompare

[ Source](https://github.com/soandsoSwEn/forecast-verifiability)[ Packagist](https://packagist.org/packages/soandso/forecast-verifiability)[ RSS](/packages/soandso-forecast-verifiability/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (2)Used By (0)

Weather forecast verifiability - PHP library for evaluating the success of alternative weather forecasts
========================================================================================================

[](#weather-forecast-verifiability---php-library-for-evaluating-the-success-of-alternative-weather-forecasts)

Forecast success is characterized by indicators called meteorological forecast success criteria. Success criteria are quantitative estimates of the compliance of actual and predictive weather characteristics.

Setup
-----

[](#setup)

Add the library to your `composer.json` file in your project:

```
{
  "require": {
      "soandso/forecast-verifiability": "0.*"
  }
}
```

Use [composer](http://getcomposer.org) to install the library:

```
$ php composer.phar install
```

Composer will install Forecast verifiability inside your vendor folder. Then you can add the following to your .php files to use the library with Autoloading.

```
require_once(__DIR__ . '/vendor/autoload.php');
```

You can also use composer on the command line to require and install Forecast verifiability:

```
$ php composer.phar require soandso/forecast-verifiability:0.*
```

Minimum Requirements
--------------------

[](#minimum-requirements)

- PHP 7

Description
-----------

[](#description)

At the beginning, it is necessary to form a conjugacy matrix. To do this, you need to create an object of the ConjugacyMatrix class by giving the parameter the name of the meteorological value for which the assessment, e.g. wind:

```
$matrix = new ConjugacyMatrix('wind');
```

Next, fill in the values ​​of the elements of the conjugacy matrix

```
$matrix->setN11(104);
$matrix->setN12(12);
$matrix->setN21(58);
$matrix->setN22(369);
$matrix->setN10($matrix->calcN10());
$matrix->setN20($matrix->calcN20());
$matrix->setN01($matrix->calcN01());
$matrix->setN02($matrix->calcN02());
$matrix->setN($matrix->calcN());
$matrix->setMatrix('n11', $matrix->getN11());
$matrix->setMatrix('n12', $matrix->getN12());
$matrix->setMatrix('n21', $matrix->getN21());
$matrix->setMatrix('n22', $matrix->getN22());
$matrix->setMatrix('n10', $matrix->getN10());
$matrix->setMatrix('n20', $matrix->getN20());
$matrix->setMatrix('n01', $matrix->getN01());
$matrix->setMatrix('n02', $matrix->getN02());
$matrix->setMatrix('N', $matrix->getN());
```

Taken designation of conjugacy matrix elements

Forecasted manifestation of a phenomenonForecasted absence of a phenomenonTotal number of casesObservability of a phenomenon is observedn11n12n10There is a lack of a phenomenan21n22n20Total number of casesn01n02NAfter the conjugacy matrix is ​​constructed, individual criteria can be calculated. To do this, first create an object of the CriteriaForecast class by giving it the conjugacy matrix object

```
$criteria = new CriteriaForecast($matrix);
```

Calculation general forecast accuracy. Sets the name of the criterion (necessary for generating output)ю

```
$criteria->setNameCriteria('General forecast accuracy');
```

Valid list of criteria:

```
'General forecast accuracy'
'Forecast accuracy criterion'
'Forecast reliability criterion'
'Climate entropy'
'Conditional entropy'
'Amount of forecaste information'
'Information relation'
```

Sets criterion units

```
$criteria->setUnit('%');
```

Value calculation

```
$criteria->calclateP();
```

To generate a general conclusion (many different criteria can be calculated for one task), you need to add the result to a general container for output.

```
$criteria->setValueCriteria($criteria->getNameCriteria(), $criteria->getP(), $criteria->getUnit());
```

Calculation forecast accuracy criterion.

```
$criteria->setNameCriteria('Forecast accuracy criterion');
$criteria->calculateQ();
$criteria->setValueCriteria($criteria->getNameCriteria(), $criteria->getQ());
```

Calculation forecast reliability criterion.

```
$criteria->setNameCriteria('Forecast reliability criterion');
$criteria->calculateH();
$criteria->setValueCriteria($criteria->getNameCriteria(), $criteria->getH());
```

Calculation climate entropy.

```
$criteria->setNameCriteria('Climate entropy');
$criteria->calculateHf();
$criteria->setValueCriteria($criteria->getNameCriteria(), $criteria->getHf());
```

Calculation conditional entropy.

```
$criteria->setNameCriteria('Conditional entropy');
$criteria->calculateHp();
$criteria->setValueCriteria($criteria->getNameCriteria(), $criteria->getHp());
```

Calculation amount of forecaste information.

```
$criteria->setNameCriteria('Amount of forecaste information');
$criteria->calculateI();
$criteria->setValueCriteria($criteria->getNameCriteria(), $criteria->getI());
```

Calculation information relation.

```
$criteria->setNameCriteria('Information relation');
$criteria->calculateV();
$criteria->setValueCriteria($criteria->getNameCriteria(), $criteria->getV());
```

Get all values ​​of criteria:

```
$criteria->getValueCriteries();
```

Get the value of a criterion by naming it:

```
$criteria->getValueCriteria('General forecast accuracy');
```

The output of the output function can be an array of the following form:

```
Array
(
    [General forecast accuracy] => Array
        (
            [value] => 87.108655616943
            [unit] => %
        )

    [Forecast accuracy criterion] => Array
        (
            [value] => 0.76072034240491
            [unit] =>
        )

    [Forecast reliability criterion] => Array
        (
            [value] => 0.66472611802064
            [unit] =>
        )

   ...........................

)
```

Standards
---------

[](#standards)

Grouping conforms to the following standards:

- PSR-2 - Basic coding standard ()
- PSR-4 - Autoloader ()
- PSR-12 - Extended coding style guide ()

License
-------

[](#license)

Grouping is licensed under the GPLv2 License ().

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2339d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d39f3468aa148d0b6da1c08204e957ff0cd4d0979e4d862ad5ddfd29ddb80117?d=identicon)[soandso](/maintainers/soandso)

---

Top Contributors

[![soandsoSwEn](https://avatars.githubusercontent.com/u/18630322?v=4)](https://github.com/soandsoSwEn "soandsoSwEn (5 commits)")

### Embed Badge

![Health badge](/badges/soandso-forecast-verifiability/health.svg)

```
[![Health](https://phpackages.com/badges/soandso-forecast-verifiability/health.svg)](https://phpackages.com/packages/soandso-forecast-verifiability)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
