/** * Create a map from an array and index mapping. * * @param mapping The index mapping specifying the keys. * @param values The array of values. * @return A sparse vector mapping the IDs in {@code map} to the values in {@code values}. * @throws IllegalArgumentException if {@code values} not the same size as {@code idx}. */ public static Long2DoubleSortedArrayMap fromArray(KeyIndex mapping, double[] values) { return fromArray(mapping, DoubleArrayList.wrap(values)); }
/** * Wraps a given array into an array list. * * <p> * Note it is guaranteed that the type of the array returned by * {@link #elements()} will be the same (see the comments in the class * documentation). * * @param a * an array to wrap. * @return a new array list wrapping the given array. */ public static DoubleArrayList wrap(final double a[]) { return wrap(a, a.length); } /**
/** * Create a map from an array and index mapping. * * @param mapping The index mapping specifying the keys. * @param values The array of values. * @return A sparse vector mapping the IDs in {@code map} to the values in {@code values}. * @throws IllegalArgumentException if {@code values} not the same size as {@code idx}. */ public static Long2DoubleSortedArrayMap fromArray(KeyIndex mapping, double[] values) { return fromArray(mapping, DoubleArrayList.wrap(values)); }
@Override protected double[] createOutputStatistics() { DoubleList values = new DoubleArrayList(); values.addAll(DoubleArrayList.wrap(stats.createOutputStatistics(orderStats))); auc = aucLossCalculator.evaluateStatistic(); confidenceInterval95 = aucLossCalculator.confidenceInterval95(); values.add(auc); values.add(confidenceInterval95[0]); values.add(confidenceInterval95[1]); return values.toDoubleArray(); }
metricsNoScore.trim(); String[] elements = metricsNoScore.toArray(new String[metricsNoScore.size()]); DoubleArrayList all = DoubleArrayList.wrap(delegate.getMetricValues(elements));
final double[] performanceValues = perfDescriptor.estimateMetric(computationGraph, validationIterator, args().numValidation, perfDescriptor.performanceMetrics()); metricValues = DoubleArrayList.wrap(performanceValues);