/** * Constructs a StandardDeviation from an external second moment. * * @param m2 the external moment */ public StandardDeviation(final SecondMoment m2) { variance = new Variance(m2); }
/** * Constructs a StandardDeviation from an external second moment. * * @param m2 the external moment */ public StandardDeviation(final SecondMoment m2) { variance = new Variance(m2); }
/** * Contructs a StandardDeviation with the specified value for the * <code>isBiasCorrected</code> property and the supplied external moment. * If <code>isBiasCorrected</code> is set to <code>true</code>, the * {@link Variance} used in computing results will use the bias-corrected, * or "sample" formula. See {@link Variance} for details. * * @param isBiasCorrected whether or not the variance computation will use * the bias-corrected formula * @param m2 the external moment */ public StandardDeviation(boolean isBiasCorrected, SecondMoment m2) { variance = new Variance(isBiasCorrected, m2); }
/** * Contructs a StandardDeviation with the specified value for the * <code>isBiasCorrected</code> property. If this property is set to * <code>true</code>, the {@link Variance} used in computing results will * use the bias-corrected, or "sample" formula. See {@link Variance} for * details. * * @param isBiasCorrected whether or not the variance computation will use * the bias-corrected formula */ public StandardDeviation(boolean isBiasCorrected) { variance = new Variance(isBiasCorrected); }
/** * Constructs a StandardDeviation. Sets the underlying {@link Variance} * instance's <code>isBiasCorrected</code> property to true. */ public StandardDeviation() { variance = new Variance(); }
/** * Constructs a StandardDeviation from an external second moment. * * @param m2 the external moment */ public StandardDeviation(final SecondMoment m2) { variance = new Variance(m2); }
/** * Constructs a StandardDeviation. Sets the underlying {@link Variance} * instance's <code>isBiasCorrected</code> property to true. */ public StandardDeviation() { variance = new Variance(); }
/** * Constructs a StandardDeviation. Sets the underlying {@link Variance} * instance's <code>isBiasCorrected</code> property to true. */ public StandardDeviation() { variance = new Variance(); }
/** * Contructs a StandardDeviation with the specified value for the * <code>isBiasCorrected</code> property. If this property is set to * <code>true</code>, the {@link Variance} used in computing results will * use the bias-corrected, or "sample" formula. See {@link Variance} for * details. * * @param isBiasCorrected whether or not the variance computation will use * the bias-corrected formula */ public StandardDeviation(boolean isBiasCorrected) { variance = new Variance(isBiasCorrected); }
/** * Contructs a StandardDeviation with the specified value for the * <code>isBiasCorrected</code> property. If this property is set to * <code>true</code>, the {@link Variance} used in computing results will * use the bias-corrected, or "sample" formula. See {@link Variance} for * details. * * @param isBiasCorrected whether or not the variance computation will use * the bias-corrected formula */ public StandardDeviation(boolean isBiasCorrected) { variance = new Variance(isBiasCorrected); }
/** * Contructs a StandardDeviation with the specified value for the * <code>isBiasCorrected</code> property and the supplied external moment. * If <code>isBiasCorrected</code> is set to <code>true</code>, the * {@link Variance} used in computing results will use the bias-corrected, * or "sample" formula. See {@link Variance} for details. * * @param isBiasCorrected whether or not the variance computation will use * the bias-corrected formula * @param m2 the external moment */ public StandardDeviation(boolean isBiasCorrected, SecondMoment m2) { variance = new Variance(isBiasCorrected, m2); }
/** * Contructs a StandardDeviation with the specified value for the * <code>isBiasCorrected</code> property and the supplied external moment. * If <code>isBiasCorrected</code> is set to <code>true</code>, the * {@link Variance} used in computing results will use the bias-corrected, * or "sample" formula. See {@link Variance} for details. * * @param isBiasCorrected whether or not the variance computation will use * the bias-corrected formula * @param m2 the external moment */ public StandardDeviation(boolean isBiasCorrected, SecondMoment m2) { variance = new Variance(isBiasCorrected, m2); }
/** * {@inheritDoc} */ @Override public Variance copy() { Variance result = new Variance(); copy(this, result); return result; }
/** * {@inheritDoc} */ @Override public Variance copy() { Variance result = new Variance(); copy(this, result); return result; }
/** * Calculates the variance of the y values. * * @return Y variance */ protected double calculateYVariance() { return new Variance().evaluate(Y.getData()); }
/** * Returns the variance of the values that have been added. * <p> * Double.NaN is returned if no values have been added. * </p> * @return the variance */ public double getVariance() { if (varianceImpl == variance) { return new Variance(secondMoment).getResult(); } else { return varianceImpl.getResult(); } }
/** * Returns the variance of the values that have been added. * <p> * Double.NaN is returned if no values have been added.</p> * * @return the variance */ public double getVariance() { if (varianceImpl == variance) { return new Variance(secondMoment).getResult(); } else { return varianceImpl.getResult(); } }
/** * Returns the variance of the values that have been added. * <p> * Double.NaN is returned if no values have been added. * </p> * @return the variance */ public double getVariance() { if (varianceImpl == variance) { return new Variance(secondMoment).getResult(); } else { return varianceImpl.getResult(); } }
private void prepareVariance() { this.var = new double[this.feats[0].length]; Matrix m = new DenseMatrix(feats); double[] colArr = new double[this.feats.length]; Variance v = new Variance(); for (int i = 0; i < this.var.length; i++) { m.column(i).storeOn(colArr, 0); this.var[i] = v.evaluate(colArr); } }
private void prepareVariance() { this.var = new double[this.feats[0].length]; Matrix m = new DenseMatrix(feats); double[] colArr = new double[this.feats.length]; Variance v = new Variance(); for (int i = 0; i < this.var.length; i++) { m.column(i).storeOn(colArr, 0); this.var[i] = v.evaluate(colArr); } }