This is ML and DM Class written in PHP OOP, currently only support "Apriori"
This package is made for my college research purpose. But I made it opensource, so everyone can use this class for their projects (if needed) Written by: Fahmi Rizalul
All you need is just install this package into your project using composer.
$ composer require rfahmi/ai
That's all.
Currently only support Apriori
$apriori = new Apriori();
$apriori->setSupport(3);
$apriori->setConfidence(0.7);
$items = ['A', 'B', 'C', 'D', 'E'];
$transactions = [
['A', 'B', 'C'],
['A', 'C'],
['A', 'B', 'D'],
['A', 'D'],
['B', 'C', 'E'],
];
$apriori->train($items, $transactions);
$apriori->getRules();
$apriori->getFrequentset();
$apriori->predict(['A']);
Reach out to me at one of the following places!
- Website at
rfahmi.com
- Instagram at
Fahmi Rizalul
- MIT license
- Copyright 2020 © Fahmi Rizalul.