CStats:Kurtosis
The Kurtosis method computes the kurtosis parameter for a data sample. The sample may be a Lua table or a class object of type CImage, CArray, or CMatrix. For CImage and CMatrix objects, an optional CRect object can be used to define the points used in the calculation.
Kurtosis measures the flatness of the sample distribution in comparison with a Guassian Normal population. A distribution with kurtosis = 0 has the degree of central peakness of a Gaussian normal distribution. Kurtosis > 0 indicates that the distribution is more centrally peaked than a Gaussian distribution, and vice versa. A uniform distribution has Kurtosis = –1.2.
nKurtosis = CStats:Kurtosis( table ) nKurtosis = CStats:Kurtosis( CImage, ) nKurtosis = CStats:Kurtosis( CImage, CRect ) nKurtosis = CStats:Kurtosis( CArray ) nKurtosis = CStats:Kurtosis( CArray, CRect ) nKurtosis = CStats:Kurtosis( CMatrix ) where |
table is a lua table containing the data.
CImage, CArray, and CMatrix are class objects containing the data to measure,
CRect is a CRect rectangle object that defines the region to measure..
nKurtosis is the kurtosis parameter of the data distribution. On failure, 0 is returned.
Suppose that CImage object I and CRect object R exist. The following script returns the kurtosis parameter for values inside a rectangle on the image:
|
-- create a CStats object |
|
-- returns the kurtosis parameter |
|
-- list the result |
The following script computes the kurtosis parameter for a table of numbers:
|
-- create a CStats object |
|
-- create a table to measure |
|
-- list the result |