# Tcl Library Source Code

Check-in [4a95b1eebb]

Many hyperlinks are disabled.
 ```619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 ``` ```[arg_def int numberSamples] Number of samples (default: 1) [list_end] [call [cmd ::math::statistics::wasserstein-distance] [arg prob1] [arg prob2]] Compute the Wasserstein distance or earth mover's distance for two equidstantly spaced histograms or probability densities. The histograms need not to be normalised to sum to one, but they must have the same number of entries. [nl] Note: the histograms are assumed to be based on the same equidistant intervals. As the bounds are not passed, the value is expressed in the length of the intervals. [list_begin arguments] [arg_def list prob1] List of values for the first histogram/probability density [arg_def list prob2] List of values for the second histogram/probability density [list_end] [call [cmd ::math::statistics::kl-divergence] [arg prob1] [arg prob2]] Compute the Kullback-Leibler (KL) divergence for two equidstantly spaced histograms or probability densities. The histograms need not to be normalised to sum to one, but they must have the same number of entries. [nl] Note: the histograms are assumed to be based on the same equidistant intervals. As the bounds are not passed, the value is expressed in the length of the intervals. [nl] Note also that the KL divergence is not symmetric and that the second histogram should not contain zeroes in places where the first histogram has non-zero values. [list_begin arguments] [arg_def list prob1] List of values for the first histogram/probability density [arg_def list prob2] List of values for the second histogram/probability density [list_end] ``` ``` < > | < > | < > | ``` ```619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 ``` ```[arg_def int numberSamples] Number of samples (default: 1) [list_end] [call [cmd ::math::statistics::wasserstein-distance] [arg prob1] [arg prob2]] Compute the Wasserstein distance or earth mover's distance for two equidstantly spaced histograms or probability densities. The histograms need not to be normalised to sum to one, but they must have the same number of entries. [para] Note: the histograms are assumed to be based on the same equidistant intervals. As the bounds are not passed, the value is expressed in the length of the intervals. [list_begin arguments] [arg_def list prob1] List of values for the first histogram/probability density [arg_def list prob2] List of values for the second histogram/probability density [list_end] [call [cmd ::math::statistics::kl-divergence] [arg prob1] [arg prob2]] Compute the Kullback-Leibler (KL) divergence for two equidstantly spaced histograms or probability densities. The histograms need not to be normalised to sum to one, but they must have the same number of entries. [para] Note: the histograms are assumed to be based on the same equidistant intervals. As the bounds are not passed, the value is expressed in the length of the intervals. [para] Note also that the KL divergence is not symmetric and that the second histogram should not contain zeroes in places where the first histogram has non-zero values. [list_begin arguments] [arg_def list prob1] List of values for the first histogram/probability density [arg_def list prob2] List of values for the second histogram/probability density [list_end] ```