|
46 | 46 | <td bgcolor="blue"> <font color="white">
|
47 | 47 | <PRE><B>
|
48 | 48 | enum class exponential_decay_spec : unsigned char {
|
49 |
| - center_of_gravity = 1, // Decay = 1 / (1 + value) For value >= 0 |
50 |
| - span = 2, // Decay = 2 / (1 + value) For value >= 1 |
51 |
| - halflife = 3, // Decay = 1 - e<sup>log(0.5)/value</sup> For value > 0 |
52 |
| - fixed = 4, // Decay = value For 0 < value <= 1 |
| 49 | + center_of_gravity = 1, // Decay = 1 / (1 + α) For α >= 0 |
| 50 | + span = 2, // Decay = 2 / (1 + α) For α >= 1 |
| 51 | + halflife = 3, // Decay = 1 - e<sup>log(0.5)/α </sup> For α > 0 |
| 52 | + fixed = 4, // Decay = α For 0 < α <= 1 |
53 | 53 | };</B></PRE></font>
|
54 | 54 | </td>
|
55 | 55 | <td>
|
56 |
| - This spec determines how an exponentially moving stat decays. Based on this spec, the value parameter is converted to decay. |
| 56 | + This spec determines how an exponentially moving stat decays. Based on this spec, the value (α) parameter is converted to decay. |
57 | 57 | </td>
|
58 | 58 | </tr>
|
59 | 59 |
|
|
91 | 91 | </PRE></I>
|
92 | 92 | Formula if finite_adjust is true:<BR>
|
93 | 93 | <I><PRE>
|
94 |
| - X<SUB>t</SUB> + (1 - decay) * X<SUB>t-1</SUB> + (1 - decay)<SUP>2</SUP> * X<SUB>t-2</SUB> + ... + (1 - decay)<SUP>t</SUP> * X<SUB>0</SUB> |
95 |
| - Y<SUB>t</SUB> = ------------------------------------------------------------------------ |
96 |
| - 1 + (1 - decay) + (1 - decay)<SUP>2</SUP> + ... + (1 - decay)<SUP>t</SUP> |
| 94 | + X<SUB>t</SUB>+(1-decay)*X<SUB>t-1</SUB>+(1-decay)<SUP>2</SUP>*X<SUB>t-2</SUB>+ ... +(1-decay)<SUP>t</SUP>*X<SUB>0</SUB> |
| 95 | + Y<SUB>t</SUB> = ------------------------------------------------------ |
| 96 | + 1+(1-decay)+(1-decay)<SUP>2</SUP>+ ... +(1-decay)<SUP>t</SUP> |
97 | 97 | </PRE></I>
|
98 | 98 | Constructor:<BR>
|
99 | 99 | <I>
|
100 | 100 | <PRE>
|
101 | 101 | ExponentiallyWeightedMeanVisitor(
|
102 | 102 | exponential_decay_spec eds, // See exponential_decay_spec type
|
103 |
| - double value, // Value to be decayed |
104 |
| - bool finite_adjust = false); // Adjust for the fact that this is not an infinite data set |
| 103 | + double value, // Value (α) to be decayed |
| 104 | + bool finite_adjust = false); // Adjust for the fact that this |
| 105 | + // is not an infinite data set |
105 | 106 | </PRE>
|
106 | 107 | </I>
|
107 | 108 | </td>
|
|
135 | 136 | <I>
|
136 | 137 | <PRE>
|
137 | 138 | ExponentiallyWeightedVarVisitor(
|
138 |
| - exponential_decay_spec eds, // See exponential_decay_spec type |
139 |
| - double value); // Value to be decayed |
| 139 | + exponential_decay_spec eds, // See exponential_decay_spec type |
| 140 | + double value); // Value (α) to be decayed |
140 | 141 | </PRE>
|
141 | 142 | </I>
|
142 | 143 | </td>
|
|
170 | 171 | <I>
|
171 | 172 | <PRE>
|
172 | 173 | ExponentiallyWeightedCovVisitor(
|
173 |
| - exponential_decay_spec eds, // See exponential_decay_spec type |
174 |
| - double value); // Value to be decayed |
| 174 | + exponential_decay_spec eds, // See exponential_decay_spec type |
| 175 | + double value); // Value (α) to be decayed |
175 | 176 | </PRE>
|
176 | 177 | </I>
|
177 | 178 | </td width="30%">
|
|
205 | 206 | <I>
|
206 | 207 | <PRE>
|
207 | 208 | ExponentiallyWeightedCorrVisitor(
|
208 |
| - exponential_decay_spec eds, // See exponential_decay_spec type |
209 |
| - double value); // Value to be decayed |
| 209 | + exponential_decay_spec eds, // See exponential_decay_spec type |
| 210 | + double value); // Value (α) to be decayed |
210 | 211 | </PRE>
|
211 | 212 | </I>
|
212 | 213 | </td>
|
|
0 commit comments