PHPackages                             krypt0nn/cati-tree - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. krypt0nn/cati-tree

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

krypt0nn/cati-tree
==================

Category Identification Tree

0.2.3(4y ago)1241GPL-3.0-or-laterPHPPHP &gt;=7.4

Since May 23Pushed 4y ago1 watchersCompare

[ Source](https://github.com/krypt0nn/cati-tree)[ Packagist](https://packagist.org/packages/krypt0nn/cati-tree)[ Docs](https://github.com/KRypt0nn/cati-tree)[ RSS](/packages/krypt0nn-cati-tree/feed)WikiDiscussions main Synced 6d ago

READMEChangelog (5)DependenciesVersions (6)Used By (1)

🚀 CATI Tree
===========

[](#-cati-tree)

**CATI Tree** *(Category Identification Tree)* - library for realization datasets identification in PHP 7.4+

This data structure and the algorithm implemented in it were invented by me so they certainly will work like pieces of shit. More useful information (in Russian) you can read [here](https://twitter.com/krypt0nn/status/1394701165238046724?s=20)

Installation
------------

[](#installation)

```
composer require krypt0nn/cati-tree

```

Example of work
---------------

[](#example-of-work)

### Tree

[](#tree)

```
$tree = CATI\Tree::train ([
    'a' => [
        [1, 2, 3],
        [1, 2, 4],
        [5, 6, 7],
        [6, 7, 8],
        [2, 3, 6]
    ],

    'b' => [
        [2, 3, 1]
    ]
]);

echo 'Training accuracy: '. $tree->acuracy();

file_put_contents ('tree.json', json_encode ($tree->export ()));
```

```
$tree = CATI\Tree::load (json_decode (file_get_contents ('tree.json'), true));

echo $tree->predict ([6, 7, 8]) ?: 'unknown'; // a
```

### Random forest

[](#random-forest)

```
$forest = CATI\RandomForest::create ([
    'a' => [
        [1, 2, 3],
        [1, 2, 4],
        [5, 6, 7],
        [6, 7, 8],
        [2, 3, 6]
    ],

    'b' => [
        [2, 3, 1]
    ]
], forestSize: 5);

echo 'Training accuracy: '. $forest->acuracy();

file_put_contents ('forest.json', json_encode ($forest->export ()));
```

```
$forest = CATI\RandomForest::load (json_decode (file_get_contents ('forest.json'), true));

print_r ($forest->probability ([6, 7, 8]));
```

Author: [Nikita Podvirnyy](https://vk.com/technomindlp)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

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

Every ~2 days

Total

5

Last Release

1811d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c45ee4c1f0ae802c481e2003e6d62c364a12e60354c913a9aca7ed42777ca773?d=identicon)[Observer KRypt0n\_](/maintainers/Observer%20KRypt0n_)

---

Top Contributors

[![krypt0nn](https://avatars.githubusercontent.com/u/29639507?v=4)](https://github.com/krypt0nn "krypt0nn (8 commits)")

---

Tags

machine-learningphp

### Embed Badge

![Health badge](/badges/krypt0nn-cati-tree/health.svg)

```
[![Health](https://phpackages.com/badges/krypt0nn-cati-tree/health.svg)](https://phpackages.com/packages/krypt0nn-cati-tree)
```

###  Alternatives

[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

205144.8k5](/packages/bezhansalleh-filament-google-analytics)[bolt/assets

🛠 Javascript and CSS Assets used in Bolt's backend. Do not `require` directly.

10144.4k2](/packages/bolt-assets)[ruthgeridema/laravel-url-rewrites

Easy URL rewrites in your Laravel application

297.0k](/packages/ruthgeridema-laravel-url-rewrites)[jjs/geonames-bundle

GeoNames.org geographical data and associated functionality

191.2k](/packages/jjs-geonames-bundle)

PHPackages © 2026

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