devfym/intelliphp 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

devfym/intelliphp

Composer 安装命令:

composer require devfym/intelliphp

包简介

Machine Learning for PHP.

README 文档

README

PHP from Packagist Latest Stable Version Total Downloads Build Status Coverage Status Scrutinizer Code Quality Documentation Status License

Composer Library for Machine Learning.

Requirements

Currently it requires PHP Version >= 7.2

How to install package

composer require devfym/intelliphp

Features

  • Data
  • Math (method in DataFrame / Series)
    • Min, Max, Mean, Median
    • Standard Deviation
    • Variance
    • Quartile
  • Statistic
    • Correlation
      • Pearson Correlation
      • Spearman Rank Correlation
      • Kendall Rank Correlation
    • Differences
      • F Test
    • Activation Function
      • ReLU
      • Sigmoid
      • Softmax
    • Validation
      • Mean Squared Error (MSE)
      • Root Mean Squared Error (RMSE)
  • Regression

Examples

DataFrame

// Call autoload to import Composer packages
require_once __DIR__ . '/vendor/autoload.php';

// Import DataFrame
use devfym\Data\DataFrame;

// Create new instance
$df = new DataFrame();

// Create sample array-formatted data
$data = [
    'name' => ['aaron','bambi','celine','dennise'],
    'age'  => [12, 14, 16, 18]
];

// set data into DataFrame
$df->readArray($data);

// Get Columns
$df->getColumns();

// Get Index
$df->getIndex();

// Get array of Name
$df->name->all();

// Get array of Age
$df->age->all();

// Get Mean of Age
$df->age->mean();

Linear Regression

// Call autoload to import Composer packages
require_once __DIR__ . '/vendor/autoload.php';

// Import LinearRegression
use devfym\Regression\LinearRegression;

// Create new instance 
$linear = new LinearRegression();

// Create Train Data
$x_train = [2, 4, 6, 8, 10];
$y_train = [1, 3, 5, 7, 9];

// Set Train Data into instance via setTrain(@array predictors, @array outcomes) method. 
$linear->setTrain($x_train, $y_train);

// Generate LinearRegression Model.
$linear->model();

// Predict Value by passing Predictor via predict(@float predictor) method.
$linear->predict(7);

// it will return a value of 6.

License

MIT

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-12-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固