承接 offdev/bandit 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

offdev/bandit

最新稳定版本:1.0.0

Composer 安装命令:

composer require --dev offdev/bandit

包简介

An A/B/x testing algorithm written in PHP by implementing the solution to the multi armed bandit problem

README 文档

README

An A/B/x testing algorithm written in PHP by implementing the solution to the multi armed bandit problem

Latest Stable Version Minimum PHP Version Build Status License

Requirements

  • PHP >= 7.4
  • Composer

Installation

$ composer require offdev/bandit

General Usage

First, you need to set up a machine, and its possible levers. A lever might have already been pulled a few times, and some levers may also have rewarded the lucky person which pulled it, so adjust those numbers accordingly. Example:

use Offdev\Bandit\Lever;
use Offdev\Bandit\Machine;

$machine = new Machine(
    new Lever('first-lever', 123, 1),
    new Lever('second-lever', 108, 3),
    new Lever('third-lever', 115, 0),
);

Now you need a strategy to solve your problem. See this link for more information about strategies, and have a look at the example ones I have included in src/php/Strategies. Example:

use Offdev\Bandit\Strategies\EpsilonGreedy;

$strategy = new EpsilonGreedy();
$winningLever = $strategy->solve($machine);

It is as simple as that :)

TODO

Add more docs :)

统计信息

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

GitHub 信息

  • Stars: 17
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Apache
  • 更新时间: 2016-08-13