turbustat.statistics.
PDF_Distance
(img1, img2, min_val1=-inf, min_val2=-inf, do_fit=True, normalization_type=None, nbins=None, weights1=None, weights2=None)[source] [edit on github]¶Bases: object
Calculate the distance between two arrays using their PDFs.
Parameters: | img1 : numpy.ndarray or astropy.io.fits.PrimaryHDU or spectral_cube.LowerDimensionalObject or SpectralCube
img2 : numpy.ndarray or astropy.io.fits.PrimaryHDU or spectral_cube.LowerDimensionalObject or SpectralCube
min_val1 : float, optional
min_val2 : float, optional
do_fit : bool, optional
normalization_type : {“normalize”, “normalize_by_mean”}, optional
nbins : int, optional
weights1 : numpy.ndarray or astropy.io.fits.PrimaryHDU or spectral_cube.LowerDimensionalObject or SpectralCube, optional
weights2 : numpy.ndarray or astropy.io.fits.PrimaryHDU or spectral_cube.LowerDimensionalObject or SpectralCube, optional
|
---|
Methods Summary
compute_ad_distance () |
Compute the distance using the Anderson-Darling Test. |
compute_hellinger_distance () |
Computes the Hellinger Distance between the two PDFs. |
compute_ks_distance () |
Compute the distance using the KS Test. |
compute_lognormal_distance () |
Compute the combined t-statistic for the difference in the widths of a lognormal distribution. |
distance_metric ([statistic, verbose, ...]) |
Calculate the distance. |
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.
compute_lognormal_distance
()[source] [edit on github]¶Compute the combined t-statistic for the difference in the widths of a lognormal distribution.
distance_metric
(statistic='all', verbose=False, label1='Data 1', label2='Data 2', save_name=None)[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: | statistic : ‘all’, ‘hellinger’, ‘ks’, ‘lognormal’
labels : tuple, optional
verbose : bool, optional
label1 : str, optional
label2 : str, optional
save_name : str,optional
|
---|