Package weka.core.matrix

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


    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();
  }

  /**
 
View Full Code Here


    DoubleVector values = mixingDistribution.getFunctionValues();

    DoubleVector d = Maths.dnormLog( x, points, 1 );
    d.minusEquals( d.max() );

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

    return ((DoubleVector) points.times(2*x).minusEquals(x*x))
    .innerProduct( d ) / d.sum();
  }
View Full Code Here

    DoubleVector values = mixingDistribution.getFunctionValues();
    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;
  }

  /**
 
View Full Code Here

    DoubleVector d2 = Maths.dnormLog( -x, mean, 1 );
    d2.minusEquals( d1max );

    d1 = d1.map("java.lang.Math", "exp");
    d1.timesEquals( values )
    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());
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.