@Override public Vector getMean() { return this.parameters.scale(1.0 / this.parameters.norm1()); }
@Override public Vector getMean() { return this.parameters.scale(1.0 / this.parameters.norm1()); }
@Override public Vector getMean() { return this.parameters.scale( this.numTrials/this.parameters.norm1() ); }
@Override public Vector getMean() { return this.parameters.scale( this.numTrials / this.parameters.norm1() ); }
@Override public Vector getMean() { return this.parameters.scale( this.parameters.norm1() ); }
@Override public Vector getMean() { return this.parameters.scale( this.numTrials / this.parameters.norm1() ); }
@Override public Vector getMean() { return this.parameters.scale( this.numTrials/this.parameters.norm1() ); }
@Override public Vector getMean() { return this.parameters.scale( this.numTrials / this.parameters.norm1() ); }
@Override public Vector getMean() { return this.parameters.scale( this.parameters.norm1() ); }
@Override public Vector getMean() { return this.parameters.scale( this.numTrials/this.parameters.norm1() ); }
@Override public Vector getMean() { return this.parameters.scale( this.parameters.norm1() ); }
@Override public Vector getMean() { return this.parameters.scale(1.0 / this.parameters.norm1()); }
public double computeEquivalentSampleSize( DirichletDistribution belief) { Vector a = belief.getParameters(); return a.norm1() / this.getNumTrials(); }
public Vector computeLocalWeights( final Vector counts) { // Since the counts are positive, the 1-norm of them is their sum. final Vector result = this.vectorFactory.copyVector(counts); final double countSum = counts.norm1(); if (countSum != 0.0) { result.scaleEquals(1.0 / countSum); } return result; }
public double computeEquivalentSampleSize( DirichletDistribution belief) { Vector a = belief.getParameters(); return a.norm1() / this.getNumTrials(); }
public double computeEquivalentSampleSize( DirichletDistribution belief) { Vector a = belief.getParameters(); return a.norm1() / this.getNumTrials(); }
public Vector computeLocalWeights( final Vector counts) { // Since the counts are positive, the 1-norm of them is their sum. final Vector result = this.vectorFactory.copyVector(counts); final double countSum = counts.norm1(); if (countSum != 0.0) { result.scaleEquals(1.0 / countSum); } return result; }
public Vector computeLocalWeights( final Vector counts) { // Since the counts are positive, the 1-norm of them is their sum. final Vector result = this.vectorFactory.copyVector(counts); final double countSum = counts.norm1(); if (countSum != 0.0) { result.scaleEquals(1.0 / countSum); } return result; }
/** * Evaluates the Manhattan distance between the two given vectors. * * @param first The first Vector. * @param second The second Vector. * @return The Manhattan distance between the two given vectors. */ public double evaluate( final Vectorizable first, final Vectorizable second) { return first.convertToVector().minus(second.convertToVector()).norm1(); } }
/** * Evaluates the Manhattan distance between the two given vectors. * * @param first The first Vector. * @param second The second Vector. * @return The Manhattan distance between the two given vectors. */ public double evaluate( final Vectorizable first, final Vectorizable second) { return first.convertToVector().minus(second.convertToVector()).norm1(); } }