Meant for AI using a wrapped Rubix ML library to make it very approachable
torian257x/ai-php-rubix-wrap-laravel is a Laravel package for meant for ai using a wrapped rubix ml library to make it very approachable.
It currently has 26 GitHub stars and 72 downloads on Packagist (latest version 0.9.1.4).
Install it with composer require torian257x/ai-php-rubix-wrap-laravel.
Discover more Laravel packages by torian257x
or browse all Laravel packages to compare alternatives.
Last updated
This package is about Artificial Intelligence, Machine Learning and Pattern Recognition in Laravel.
The video tutorial with examples on how to use the library can be found here:
how to use AI in Laravel (full playlist)
Do AI with 2 lines of code:
$all_animals = DogsAndCats::all();
$report = RubixAi::train($all_animals, 'dog_or_cat');
that's it.
This creates a file in your laravel storage/ai_rubix/ folder that contains the model.
This model then will be used to predict:
$isDogOrCat = RubixAi::predict($needs_prediction);
echo $isDogOrCat; //prints ['dog']
composer require torian257x/ai-php-rubix-wrap-laravel
If there are any issues, please have a look at https://docs.rubixml.com/latest/installation.html in case you are trying to do something special. I recommend as well installing tensor https://github.com/Scien-ide/Tensor .
new KDNeighborsRegressor() for regression (say estimation of price)
new KDNeighbors() for classification (say choose dog or cat)
array_filter(
[
new NumericStringConverter(),
new MissingDataImputer(),
$needs_ohe ? new OneHotEncoder() : false,
new MinMaxNormalizer(),
]);
You can choose your own estimator if you don't like the default
Just be sure to pass it as argument to RubixAi::train(..., estimator_algorithm:<>)
Same for transformers.
You can customize the model file name as well as what attributes / columns to ignore.
This library is using a PHP standalone AI wrapper of Rubix ML