<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
arcticlinux / scientist-chances-fractional example snippets
$chance = new FractionalChance();
// Setting experiment to run 1%, 1/100 times, default 1 out of value sent to setProbability
$chance->setProbability(100);
// Explicitly setting probability to 1% or 1/100 chance
$chance->setProbability(100, 1);
$experiment = (new Scientist\Laboratory)
->experiment('experiment title')
->control($controlCallback)
->chance($chance)
->trial('trial name', $trialCallback)
->matcher($matcher);
$chance = new FractionalChance();
$chance->setProbability(3,1);
$experiment = (new Scientist\Laboratory)
->experiment('experiment title')
->control($controlCallback)
->chance($chance)
->trial('trial name', $trialCallback)
->matcher($matcher);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.