Description Usage Arguments Details Author(s) References See Also Examples
View source: R/qat_measure_histogram_difference.R
This function compares two datasets by calculating their histograms and compares them by a given metric.
1 2 | qat_measure_histogram_difference(data1, data2, metric="EMD", breakvector=NULL,
numofbars=65, factorofbar=100)
|
data1 |
The first dataset. |
data2 |
The second dataset. |
metric |
Metric of the comparison. Details see below. |
breakvector |
Breakvector for the histograms. When not given (NULL), an equidistant breakvector between the minimum and maximum of the two datasets with the given number of bars will be generated. |
numofbars |
Number of bins of the histogram, when no breakvector is given. |
factorofbar |
Correction factor for non-value bins. |
For both datasets the histograms are computed and compared by means of a given metric. As a metric for the comparison one of the following five options are usable: EMD: Earth Mover's Distance (default); KLD: Kullback-Leibler Distance; JSD: Jenson-Shannon Distance; RMS: Root Mean Square; MS: Mean Square. As a result the distance between the two histograms calculated by the metric is given.
Andre Duesterhus
Duesterhus, A., Hense, A. (2012) Advanced Information Criterion for Environmental Data Quality Assurance, \_Advances in Science and Research\_, *8*, 99-104.
qat_analyse_histogram_test_1d
, qat_analyse_histogram_test_2d
1 2 3 | vec1 <- array(rnorm(1000), c(100, 20))
vec2 <- vec1 + 1
result <- qat_measure_histogram_difference(vec1, vec2, metric="EMD", numofbars=65)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.