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


Java Descriptive.quantile方法代码示例

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


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

示例1: report

import cern.jet.stat.Descriptive; //导入方法依赖的package包/类
@Override
public Object report(Argument args[], Context context)
        throws ExtensionException, LogoException {
  LogoStatsTbl tbl = StatsExtension.getTblFromArgument(args[0]);
  int varNumber = ExtnUtils.getVarNumberFromArg(tbl, args[1]);
  double pcnt;
  try {
    pcnt = args[2].getDoubleValue();
  } catch (LogoException e) {
    throw new ExtensionException(e.getMessage());
  }
  pcnt /= 100.0;
  if (pcnt < 0.0 || pcnt > 100.0) {
    throw new ExtensionException("The percent must be between"
            + " 0.0 and 100.0, inclusive.");
  }
  double[] X = tbl.getColumn(varNumber, true);
  Sorting.mergeSort(X, 0, X.length);
  return Descriptive.quantile(new DoubleArrayList(X), pcnt);
}
 
开发者ID:cstaelin,项目名称:Stats-Extension,代码行数:21,代码来源:DescripPrims.java

示例2: bandwidthNRD

import cern.jet.stat.Descriptive; //导入方法依赖的package包/类
public double bandwidthNRD(double[] in) {

        DoubleArrayList inList = new DoubleArrayList(in.length);
        for (double d : in)
            inList.add(d);
        inList.sort();

        final double h = (Descriptive.quantile(inList, 0.75) - Descriptive.quantile(inList, 0.25)) / 1.34;

        return 4 * 1.06 *
                Math.min(Math.sqrt(DiscreteStatistics.variance(in)), h) *
                Math.pow(in.length, -0.2);
    }
 
开发者ID:beast-dev,项目名称:beast-mcmc,代码行数:14,代码来源:KernelDensityEstimator2D.java

示例3: bandwidthNRD

import cern.jet.stat.Descriptive; //导入方法依赖的package包/类
public double bandwidthNRD(double[] in) {

		DoubleArrayList inList = new DoubleArrayList(in.length);
		for (double d : in)
			inList.add(d);
		inList.sort();

		final double h = (Descriptive.quantile(inList, 0.75) - Descriptive
				.quantile(inList, 0.25)) / 1.34;

		return 4 * 1.06
				* Math.min(Math.sqrt(DiscreteStatistics.variance(in)), h)
				* Math.pow(in.length, -0.2);
	}
 
开发者ID:phylogeography,项目名称:SpreaD3,代码行数:15,代码来源:KernelDensityEstimator2D.java

示例4: opQuantile

import cern.jet.stat.Descriptive; //导入方法依赖的package包/类
/**
 *
 *
 * @param scope
 * @param data
 * @param phi
 * @return
 */
@operator(value = "quantile", can_be_const = true, type = IType.FLOAT, expected_content_type = { IType.INT,
		IType.FLOAT }, concept = { IConcept.STATISTIC })
@doc(value = "Returns the phi-quantile; that is, an element elem for which holds that phi percent of data elements are less than elem. The quantile need not necessarily be contained in the data sequence, it can be a linear interpolation.", comment = "", examples = {})
public static Double opQuantile(final IScope scope, final IContainer data, final Double phi) {

	// TODO input parameters validation

	return Descriptive.quantile(from(scope, data), phi);
}
 
开发者ID:gama-platform,项目名称:gama,代码行数:18,代码来源:Stats2.java

示例5: quantile

import cern.jet.stat.Descriptive; //导入方法依赖的package包/类
/**
 * Returns the exact <tt>phi-</tt>quantile; that is, the smallest contained element <tt>elem</tt> for which holds that <tt>phi</tt> percent of elements are less than <tt>elem</tt>.
 * @param phi must satisfy <tt>0 &lt; phi &lt; 1</tt>.
 */
public synchronized double quantile(double phi) {
	return Descriptive.quantile(sortedElements_unsafe(),phi);
}
 
开发者ID:ContentWise,项目名称:aida,代码行数:8,代码来源:DynamicBin1D.java


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