本文整理汇总了Java中cern.jet.stat.Descriptive.quantileInverse方法的典型用法代码示例。如果您正苦于以下问题:Java Descriptive.quantileInverse方法的具体用法?Java Descriptive.quantileInverse怎么用?Java Descriptive.quantileInverse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cern.jet.stat.Descriptive
的用法示例。
在下文中一共展示了Descriptive.quantileInverse方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: opQuantileInverse
import cern.jet.stat.Descriptive; //导入方法依赖的package包/类
/**
*
*
* @param scope
* @param data
* @param element
* @return
*/
@operator(value = { "quantile_inverse",
"percentile" }, can_be_const = true, type = IType.FLOAT, expected_content_type = { IType.INT,
IType.FLOAT }, concept = { IConcept.STATISTIC })
@doc(value = "Returns how many percent of the elements contained in the receiver are <= element. Does linear interpolation if the element is not contained but lies in between two contained elements.", comment = "", examples = {})
public static Double opQuantileInverse(final IScope scope, final IContainer data, final Double element) {
// TODO input parameters validation
return Descriptive.quantileInverse(from(scope, data), element);
}
示例2: 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 nmbr;
try {
nmbr = args[2].getDoubleValue();
} catch (LogoException e) {
throw new ExtensionException(e.getMessage());
}
double[] X = tbl.getColumn(varNumber, true);
Sorting.mergeSort(X, 0, X.length);
return Descriptive.quantileInverse(new DoubleArrayList(X), nmbr) * 100.0;
}
示例3: quantileInverse
import cern.jet.stat.Descriptive; //导入方法依赖的package包/类
/**
* Returns exactly how many percent of the elements contained in the receiver are <tt><= element</tt>.
* Does linear interpolation if the element is not contained but lies in between two contained elements.
*
* @param element the element to search for.
* @return the exact percentage <tt>phi</tt> of elements <tt><= element</tt> (<tt>0.0 <= phi <= 1.0)</tt>.
*/
public synchronized double quantileInverse(double element) {
return Descriptive.quantileInverse(sortedElements_unsafe(),element);
}