T
- public class KendallTauBRank<T extends RealType<T>,U extends RealType<U>> extends AbstractBinaryFunctionOp<Iterable<T>,Iterable<U>,Double> implements Ops.Coloc.KendallTau, Contingent
According to this article, Tau-b (appropriate if multiple pairs share the same first, or second, value), the rank correlation of a set of pairs (x_1, y_1), ..., (x_n, y_n):
Tau_B = (n_c - n_d) / sqrt( (n_0 - n_1) (n_0 - n_2) )where
n_0 = n (n - 1) / 2 n_1 = sum_i t_i (t_i - 1) / 2 n_2 = sum_j u_j (u_j - 1) / 2 n_c = #{ i, j; i != j && (x_i - x_j) * (y_i - y_j) > 0 }, i.e. the number of pairs of pairs agreeing on the order of x and y, respectively n_d = #{ i, j: i != j && (x_i - x_j) * (y_i - y_j) < 0 }, i.e. the number of pairs of pairs where x and y are ordered opposite of each other t_i = number of tied values in the i-th group of ties for the first quantity u_j = number of tied values in the j-th group of ties for the second quantity
SpecialOp.Flavor
NAME
Constructor and Description |
---|
KendallTauBRank() |
Modifier and Type | Method and Description |
---|---|
Double |
calculate(Iterable<T> image1,
Iterable<U> image2)
Calculates the output given two inputs.
|
boolean |
conforms()
True if the contingency holds; i.e., the current circumstances conform to
the contingency's requirements.
|
in1, in2, out, run, setInput1, setInput2
ops, setEnvironment
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
ops, setEnvironment
calculate, getIndependentInstance, run
in, setInput
calculate, run
run
candidates, filterArity, op
initialize
public Double calculate(Iterable<T> image1, Iterable<U> image2)
BinaryFunctionOp
public boolean conforms()
Contingent
conforms
in interface Contingent
Copyright © 2014–2022 ImageJ. All rights reserved.