1 | <?php |
||
14 | class Datapoint |
||
15 | { |
||
16 | /** |
||
17 | * The confidence interval measures the uncertainty around improvement. It |
||
18 | * starts out wide and shrinks as more data comes in. Significance means |
||
19 | * that the confidence interval is completely above or completely below 0. |
||
20 | * If the result is significant and positive, the confidence interval will |
||
21 | * be above 0. If the result is significant and negative, confidence interval |
||
22 | * will be below 0. If the result is inconclusive, confidence interval includes 0. |
||
23 | * @var array[number] |
||
24 | */ |
||
25 | private $confidenceInterval; |
||
26 | |||
27 | /** |
||
28 | * Indicates that this is the best performing variant for this metric. |
||
29 | * Also referred to as the 'Winner' |
||
30 | * @var boolean |
||
31 | */ |
||
32 | private $isMostConclusive; |
||
33 | |||
34 | /** |
||
35 | * Indicates if significance is above your confidence threshold |
||
36 | * @var boolean |
||
37 | */ |
||
38 | private $isSignificant; |
||
39 | |||
40 | /** |
||
41 | * The likelihood that the observed difference in conversion rate is not due to chance. |
||
42 | * @var number |
||
43 | */ |
||
44 | private $significance; |
||
45 | |||
46 | /** |
||
47 | * The relative improvement for this variant over the baseline variant. |
||
48 | * @var number |
||
49 | */ |
||
50 | private $value; |
||
51 | |||
52 | /** |
||
53 | * The number of estimated visitors remaining before result becomes statistically significant |
||
54 | * @var integer |
||
55 | */ |
||
56 | private $visitorsRemaining; |
||
57 | /** |
||
58 | * Constructor. |
||
59 | */ |
||
60 | 3 | public function __construct($options = array()) |
|
75 | |||
76 | /** |
||
77 | * Returns this object as array. |
||
78 | */ |
||
79 | 1 | public function toArray() |
|
99 | |||
100 | 1 | public function getConfidenceInterval() |
|
104 | |||
105 | 3 | public function setConfidenceInterval($confidenceInterval) |
|
109 | |||
110 | 1 | public function getIsMostConclusive() |
|
114 | |||
115 | 3 | public function setIsMostConclusive($isMostConclusive) |
|
119 | |||
120 | 1 | public function getIsSignificant() |
|
124 | |||
125 | 3 | public function setIsSignificant($isSignificant) |
|
129 | |||
130 | 1 | public function getSignificance() |
|
134 | |||
135 | 3 | public function setSignificance($significance) |
|
139 | |||
140 | 1 | public function getValue() |
|
144 | |||
145 | 3 | public function setValue($value) |
|
149 | |||
150 | 1 | public function getVisitorsRemaining() |
|
154 | |||
155 | 3 | public function setVisitorsRemaining($visitorsRemaining) |
|
159 | } |
||
160 | |||
168 |
According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.