定制 esplora/next-value-predictor 二次开发

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

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

esplora/next-value-predictor

最新稳定版本:1.0.0

Composer 安装命令:

composer require esplora/next-value-predictor

包简介

Predict the next value based on the previous values

关键字:

README 文档

README

Unit tests

The Next Value Predictor is a PHP package that predicts the next value based on the previous values for a given data set. It considers the previous values and calculates the probability of the next value. The package is intended for use in applications that require predictive analysis capabilities.

Installation

To use the package, run the following command in the command line:

$ composer require esplora/next-value-predictor

Usage

To use the package, instantiate the Predictor class, passing an array of previously recorded values as the parameter, and then call the predict() method to predict the next value.

use Esplora\Predictor\Predictor;

$predictor = new Predictor([1, 3, 1, 4, 2, 4, 3, 1, 4, 1, 4, 2, 1, 4, 5]);

$predictor->predict(); // 3.004

Weights are optional and enable you to set weighting parameters for different categories of data to help balance unbalanced sets. To use weights, pass in the desired weight as an argument for predict().

$predictor = new Predictor([1, 3, 1, 4, 2, 4, 3, 1, 4, 1, 4, 2, 1, 4, 5]);

$predictor->predict(0.0); // 5.0
$predictor->predict(0.5); // 1.789,

You can also use the probabilityGreaterThan() method to get the probability of the next value rate being greater than a certain number.

$predictor->probabilityGreaterThan(5); // 0.0
$predictor->probabilityGreaterThan(0); // 1.0

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 253.02k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 未知

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固