PDF_Distance

class turbustat.statistics.PDF_Distance(img1, img2, min_val1=0.0, min_val2=0.0, weights1=None, weights2=None)[source] [edit on github]

Bases: object

Calculate the distance between two arrays using their PDFs.

Parameters:

img1 : numpy.ndarray

Array (1-3D).

img2 : numpy.ndarray

Array (1-3D).

min_val1 : float, optional

Minimum value to keep in img1

min_val2 : float, optional

Minimum value to keep in img2

weights1 : numpy.ndarray, optional

Weights to be used with img1

weights2 : numpy.ndarray, optional

Weights to be used with img2

Methods Summary

Methods Documentation

compute_ad_distance()[source] [edit on github]

Compute the distance using the Anderson Darling Test.

compute_hellinger_distance()[source] [edit on github]

Computes the Hellinger Distance between the two PDFs.

compute_ks_distance()[source] [edit on github]

Compute the distance using the KS Test.

distance_metric(statistic='both', labels=None, verbose=False)[source] [edit on github]

Calculate the distance. NOTE: The data are standardized before comparing to ensure the distance is calculated on the same scales.

Parameters:

labels : tuple, optional

Sets the labels in the output plot.

verbose : bool, optional

Enables plotting.