Package weka.core.matrix

Examples of weka.core.matrix.DoubleVector.sum()


    Maths.dnormLog( x, mixingDistribution.getPointValues(), 1 );
   
    d.minusEquals( d.max() );
    d = d.map("java.lang.Math", "exp");
    d.timesEquals( mixingDistribution.getFunctionValues() );
    return mixingDistribution.getPointValues().innerProduct( d ) / d.sum();
  }

  /**
   * Returns the empirical Bayes estimate of a vector.
   *
 
View Full Code Here


    d = (DoubleVector) d.map("java.lang.Math", "exp");
    d.timesEquals( values )

    return ((DoubleVector) points.times(2*x).minusEquals(x*x))
    .innerProduct( d ) / d.sum();
  }
   
  /**
   *  Computes the value of h(x) given the mixture.
   * 
View Full Code Here

    DoubleVector mean = points.sqrt();
 
    DoubleVector d = Maths.dchisqLog( x, points );
    d.minusEquals( d.max() );
    d = d.map("java.lang.Math", "exp").timesEquals( values );
    double atilde = mean.innerProduct( d ) / d.sum();
    return atilde * atilde;
  }

  /**
   *  Returns the pace6 estimate of a vector.
View Full Code Here

    d2 = d2.map("java.lang.Math", "exp");
    d2.timesEquals( values )

    return ( ( points.minus(x/2)).innerProduct( d1 ) -
       ( points.plus(x/2)).innerProduct( d2 ) )
    / (d1.sum() + d2.sum());
  }
   
  /**
   *  Computes the value of h(x) given the mixture.
   * 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.