public double empiricalBayesEstimate ( double x ) {
if( Math.abs(x) > 10 ) return x; // pratical consideration; modify later
DoubleVector d =
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();
}