public static double f1Measure(Matrix confusionMatrix, long catIndex) { VerifyUtil.verifySquare(confusionMatrix); return f1Measure(precision(confusionMatrix, catIndex), recall(confusionMatrix, catIndex)); }
@SuppressWarnings("unchecked") private FastTable<Float64Vector> getRowsTable() { if (rows == null) { rows = (FastTable<Float64Vector>) ReflectionUtil.extractPrivateField(Float64Matrix.class, matrix, "_rows"); } return rows; }
public boolean isUseEJML() { return MathUtil.getBoolean(get(USEEJML)); }
private static String getUniqueString(Object o) throws IOException { if (o == null) { return ""; } else if (o instanceof String) { return (String) o; } else { return StringUtil.encodeToHex((Serializable) o); } }
private final void calc(final double[] source, final double factor, final double[] target) { VerifyUtil.verifySameSize(source, target); final int length = source.length; for (int i = 0; i < length; i++) { target[i] = source[i] * factor; } } };
public TimesScalar(boolean ignoreNaN, Matrix m1, double v) { super(m1); this.ignoreNaN = ignoreNaN; this.value = ignoreNaN ? MathUtil.ignoreNaN(v) : v; }
public boolean isUseOjalgo() { return MathUtil.getBoolean(get(USEOJALGO)); }
private boolean getTransposed() { if (transposed == null) { transposed = (Boolean) ReflectionUtil.extractPrivateField(Float64Matrix.class, matrix, "_transposed"); } return transposed; }
private final void calc(final double[] source1, final double[] source2, final double[] target) { VerifyUtil.verifySameSize(source1, source2, target); final int length = source1.length; for (int i = 0; i < length; i++) { target[i] = source1[i] + source2[i]; } }
public boolean isUseParallelColt() { return MathUtil.getBoolean(get(USEPARALLELCOLT)); }
private final void calc(final double[] source, final double value, final double[] target) { VerifyUtil.verifySameSize(source, target); final int length = source.length; for (int i = 0; i < length; i++) { target[i] = source[i] - value; } } };
public boolean isUseCommonsMath() { return MathUtil.getBoolean(get(USECOMMONSMATH)); }
public boolean isUseJBlas() { return MathUtil.getBoolean(get(USEJBLAS)); }