Home | History | Annotate | Download | only in moment

Lines Matching refs:weights

266      *   &Sigma;(weights[i]*(values[i] - weightedMean)<sup>2</sup>)/(&Sigma;(weights[i]) - 1)
271 * weights are equal, unless all weights are equal to 1. The formula assumes that
272 * weights are to be treated as "expansion values," as will be the case if for example
273 * the weights represent frequency counts. To normalize weights so that the denominator
275 * <code>evaluate(values, MathUtils.normalizeArray(weights, values.length)); </code>
282 * <li>the weights array is null</li>
283 * <li>the weights array does not have the same length as the values array</li>
284 * <li>the weights array contains one or more infinite values</li>
285 * <li>the weights array contains one or more NaN values</li>
286 * <li>the weights array contains negative values</li>
295 * @param weights the weights array
302 public double evaluate(final double[] values, final double[] weights,
307 if (test(values, weights,begin, length)) {
313 double m = mean.evaluate(values, weights, begin, length);
314 var = evaluate(values, weights, m, begin, length);
325 * &Sigma;(weights[i]*(values[i] - weightedMean)<sup>2</sup>)/(&Sigma;(weights[i]) - 1)
330 * weights are equal, unless all weights are equal to 1. The formula assumes that
331 * weights are to be treated as "expansion values," as will be the case if for example
332 * the weights represent frequency counts. To normalize weights so that the denominator
334 * <code>evaluate(values, MathUtils.normalizeArray(weights, values.length)); </code>
341 * <li>the weights array is null</li>
342 * <li>the weights array does not have the same length as the values array</li>
343 * <li>the weights array contains one or more infinite values</li>
344 * <li>the weights array contains one or more NaN values</li>
345 * <li>the weights array contains negative values</li>
353 * @param weights the weights array
358 public double evaluate(final double[] values, final double[] weights) {
359 return evaluate(values, weights, 0, values.length);
451 * &Sigma;(weights[i]*(values[i] - mean)<sup>2</sup>)/(&Sigma;(weights[i]) - 1)
460 * weights are equal, unless all weights are equal to 1. The formula assumes that
461 * weights are to be treated as "expansion values," as will be the case if for example
462 * the weights represent frequency counts. To normalize weights so that the denominator
464 * <code>evaluate(values, MathUtils.normalizeArray(weights, values.length), mean); </code>
471 * <li>the weights array is null</li>
472 * <li>the weights array does not have the same length as the values array</li>
473 * <li>the weights array contains one or more infinite values</li>
474 * <li>the weights array contains one or more NaN values</li>
475 * <li>the weights array contains negative values</li>
482 * @param weights the weights array
490 public double evaluate(final double[] values, final double[] weights,
495 if (test(values, weights, begin, length)) {
504 accum += weights[i] * (dev * dev);
505 accum2 += weights[i] * dev;
509 for (int i = 0; i < weights.length; i++) {
510 sumWts += weights[i];
528 * &Sigma;(weights[i]*(values[i] - mean)<sup>2</sup>)/(&Sigma;(weights[i]) - 1)
537 * weights are equal, unless all weights are equal to 1. The formula assumes that
538 * weights are to be treated as "expansion values," as will be the case if for example
539 * the weights represent frequency counts. To normalize weights so that the denominator
541 * <code>evaluate(values, MathUtils.normalizeArray(weights, values.length), mean); </code>
548 * <li>the weights array is null</li>
549 * <li>the weights array does not have the same length as the values array</li>
550 * <li>the weights array contains one or more infinite values</li>
551 * <li>the weights array contains one or more NaN values</li>
552 * <li>the weights array contains negative values</li>
558 * @param weights the weights array
564 public double evaluate(final double[] values, final double[] weights, final double mean) {
565 return evaluate(values, weights, mean, 0, values.length);