当前位置: 首页>>代码示例>>Java>>正文


Java StandardDeviation.getResult方法代码示例

本文整理汇总了Java中org.apache.commons.math3.stat.descriptive.moment.StandardDeviation.getResult方法的典型用法代码示例。如果您正苦于以下问题:Java StandardDeviation.getResult方法的具体用法?Java StandardDeviation.getResult怎么用?Java StandardDeviation.getResult使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.commons.math3.stat.descriptive.moment.StandardDeviation的用法示例。


在下文中一共展示了StandardDeviation.getResult方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: evaluate

import org.apache.commons.math3.stat.descriptive.moment.StandardDeviation; //导入方法依赖的package包/类
static
private Double evaluate(Collection<?> values, boolean biasCorrected){
	StandardDeviation statistic = new StandardDeviation();
	statistic.setBiasCorrected(biasCorrected);

	for(Object value : values){
		Double doubleValue = (Double)TypeUtil.parseOrCast(DataType.DOUBLE, value);

		statistic.increment(doubleValue);
	}

	return statistic.getResult();
}
 
开发者ID:jpmml,项目名称:jpmml-evaluator,代码行数:14,代码来源:StandardDeviationFunction.java

示例2: initializeGridPoints

import org.apache.commons.math3.stat.descriptive.moment.StandardDeviation; //导入方法依赖的package包/类
private void initializeGridPoints()throws SQLException{
        Statement stmt = null;
        ResultSet rs = null;

        //connect to db
        try{
            Table sqlTable = new Table(tableName.getNameForDatabase());
            SelectQuery select = new SelectQuery();
            select.addColumn(sqlTable, regressorVariable.getName().nameForDatabase());
            stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
            rs=stmt.executeQuery(select.toString());

            Min min = new Min();
            Max max = new Max();
            Mean mean = new Mean();
            StandardDeviation sd = new StandardDeviation();

            double value = 0.0;
            while(rs.next()){
                value = rs.getDouble(regressorVariable.getName().nameForDatabase());
                if(!rs.wasNull()){
                    min.increment(value);
                    max.increment(value);
                    mean.increment(value);
                    sd.increment(value);
                }
                updateProgress();
            }
            rs.close();
            stmt.close();

            //evaluation points
            double sdv = sd.getResult();
            double mn = mean.getResult();
            double lower = mn-2.5*sdv;
            double upper = mn+2.5*sdv;
            bwAdjustment *= sdv;
            bandwidth = new NonparametricIccBandwidth(sampleSize, bwAdjustment);
            gridPoints = command.getFreeOption("gridpoints").getInteger();
//            uniformDistributionApproximation = new UniformDistributionApproximation(
//                    min.getResult(), max.getResult(), gridPoints);
            uniformDistributionApproximation = new UniformDistributionApproximation(
                    lower, upper, gridPoints);

        }catch(SQLException ex){
            throw ex;
        }finally{
            if(rs!=null) rs.close();
            if(stmt!=null) stmt.close();
        }


    }
 
开发者ID:meyerjp3,项目名称:jmetrik,代码行数:54,代码来源:NonparametricCurveAnalysis.java

示例3: getInitialMaximum

import org.apache.commons.math3.stat.descriptive.moment.StandardDeviation; //导入方法依赖的package包/类
@Override
protected double getInitialMaximum(
		final StandardDeviation stats,
		final double total ) {
	return (total / stats.getN()) + stats.getResult();
}
 
开发者ID:locationtech,项目名称:geowave,代码行数:7,代码来源:StripWeakCentroidsRunner.java


注:本文中的org.apache.commons.math3.stat.descriptive.moment.StandardDeviation.getResult方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。