Multi-dimensional kernel density estimates over periodic domains

버전 1.5.0.0 (9.78 KB) 작성자: Dylan Muir
This function performs multi-variate kernel density estimates over optionally periodic domains
다운로드 수: 498
업데이트 날짜: 2017/8/16

라이선스 보기

See also http://dylan-muir.com/articles/circular_kernel_estimation/
circ_ksdensityn - Compute a kernel density estimate over periodic and aperiodic domains

Usage: [vfEstimate, vfBinVol] = circ_ksdensityn(mfObservations, mfPDFSamples, <mfDomains, vfSigmas, vfWeights>)

This function calculates a kernel density estimate of an (optionally weighted) data sample, over periodic and aperiodic domains. The sample is assumed to be independent across dimensions; i.e. density estimation is performed independently for each dimension of the data.
'mfObservations' is a set of observations made over a (possibly periodic) domain. Each row corresponds to a single observation, each column corresponds to a particular dimension. By default all dimensions are periodic in [0..2*pi]; this can be modified by providing the optional argument 'mfDomains'. Each row in 'mfDomains' is [fMin fMax], one row for each dimension in 'mfObservations'. If a particular dimension should not be periodic, the corresponding row should be [nan nan]. Bounded support over a dimension is NOT implemented; each dimension is either linear and infinite or periodic.

'mfPDFSamples' defines the sample points over which to perform the kernel density estimate, over the same domains as 'mfObservations'.

Weighted estimations can be performed by providing the optional argument 'vfWeights', where each element in 'vfWeights' corresponds to the matching observation in 'mfObservations'.

The kernel density estimate will be performed using a multivariate Gaussian kernel, independent along each dimension, and wrapped along the periodic dimensions as appropriate. Kenel widths over periodic dimensions are estimated as
(4/3)^0.2 * circ_std(mfObservations(:, nDim), vfWeights) * (length(mfObservations)^-0.2)

Kernel widths over non-periodic dimensions are estimated as
(4 * std(mfObservations(:, nDim), vfWeights)^5 / 3 / length(mfObservations))^(1/5)

The optional argument 'fSigma' can be provided to set the width of the kernel.

'vfEstimate' will be a vector with a (weighted) histogram estimate of the underlying distribution, with an entry for each point in 'mfPDFSamples'. If no weighting is supplied, the estimate will be scaled to estimate a PDF over the supplied multi-dimensional domain, taking into account the estimated volume of each bin. If a weight vector is supplied, the estimate will be scaled such that the sum over the domain attempts to match the sum of weights, taking into account the multi-dimensional bin volumes.
'vfBinVol' is a vector containing volume estimates for each row in 'mfPDFSamples', under the assumption that each dimension is linearly scaled and mutually orthogonal.

인용 양식

Dylan Muir (2024). Multi-dimensional kernel density estimates over periodic domains (https://www.mathworks.com/matlabcentral/fileexchange/44129-multi-dimensional-kernel-density-estimates-over-periodic-domains), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Vector Volume Data에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.5.0.0

Updated description
Updated description
Updated description
Updated description
Updated description
Updated usage formatting

1.4.0.0

Updated summary

1.3.0.0

Updated description

1.2.0.0

Function now returns an estimate for bin volumes surrounding each PDF sample point. Also improved scaling of returned PDF estimate.

1.1.0.0

Improved weighting of density estimate.

1.0.0.0