定制 torian257x/ai-php-rubix-wrap-laravel 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

torian257x/ai-php-rubix-wrap-laravel

Composer 安装命令:

composer require torian257x/ai-php-rubix-wrap-laravel

包简介

Meant for AI using a wrapped Rubix ML library to make it very approachable

README 文档

README

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:


Video tutorial

how to use AI in Laravel (full playlist)



Example code

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']

Installation

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 .

Default Estimator

new KDNeighborsRegressor() for regression (say estimation of price)

new KDNeighbors() for classification (say choose dog or cat)

Default Transformers

array_filter(
 [
  new NumericStringConverter(),
  new MissingDataImputer(),
  $needs_ohe ? new OneHotEncoder() : false,
  new MinMaxNormalizer(),
 ]);

Customize

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.

References

This library is using a PHP standalone AI wrapper of Rubix ML

统计信息

  • 总下载量: 72
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 26
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 26
  • Watchers: 1
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-08-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固