Package fork.lib.math.algebra.elementary.function.v1.distr

Examples of fork.lib.math.algebra.elementary.function.v1.distr.NormalDistribution


        coeffsOut.add((double)cluss.get(i).size()/size);
    }
    //funcsOut
    funcsOut= new ArrayList<>();
    for( int i=0; i<cluss.size(); i++ ){
        ParameterEstimation pe= new ParameterEstimation(cluss.get(i), funcs.get(i));
        funcsOut.add(pe.funcOut);
    }
}
View Full Code Here


* @param sigma   standard deviation
* @return  
*/
public FunctionV1 kernelDensityEstimation(double sigma){
    try{
        FunctionV1 fn= new ConstantFunction(0);
        Iterator<Double> it= cs.keySet().iterator();
        while(it.hasNext()){
            Double v= it.next();
            Integer f= cs.get(v);
            double coeff= (double) f.intValue()/size();
            fn= fn.add( (new NormalDistribution( v.doubleValue(), sigma)).
                    multiply(new ConstantFunction(coeff)) );
        }
        return fn;
    }catch(FunctionException e){
        e.printStackTrace();
        return null;
View Full Code Here

* @param coeffs
* @return
* @throws FunctionException
*/
public static double logLikelihood(Distribution data, ArrayList<DistributionFunction> distrs, ArrayList<Double> coeffs) throws FunctionException{
    FunctionV1 fn= new ConstantFunction(0);
    for( int i=0; i<distrs.size(); i++ ){
        fn = fn.add( distrs.get(i).multiply(new ConstantFunction(coeffs.get(i))) );
    }
    return data.logLikelihood(fn);
}
View Full Code Here

TOP

Related Classes of fork.lib.math.algebra.elementary.function.v1.distr.NormalDistribution

Copyright © 2018 www.massapicom. 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.