# Mode estimation in high dimensions

Suppose we have a sample $\boldsymbol{x}_i$ for $i$ in $1,\dots, n$, from a $d$-dimensional unimodal density $f(\boldsymbol{x})$. I would like to estimate the mode of $f(\boldsymbol{x})$.

The mean-shift algorithm discussed in this related post can be used to estimate the mode, but given that it is based of a non-parametric estimator of the density, I think it will requires a huge sample size $n$ if $d > 5$. Are there other options? Thanks

• I have added, to my answer, another class of algorithms with time complexity $O(dN^2)$ for $N$ points in ${\mathbb R}^d$. – Pavel Ruzankin Jan 27 '20 at 11:00

## 2 Answers

If you want to use a parametric approach, this should be pretty straightforward, I think:

Step 1: Pick a parametric distribution with one mode (e.g. a $d$-dimensional Gaussian or an analogous distribution from the $t$ family).

Step 2: Fit the distribution (e.g. by maximum likelihood)

Step 3: Find the mode of the distribution. If you chose a Gaussian in Step 1, then the mode is equal to the mean, which you estimated in Step 2. If not, you can start just somewhere and climb the probability distribution with your favorite hill-climbing algorithm (e.g. steepest ascent or BFGS). Since the distribution is unimodal, it won't matter where you start your search--you'll end up at the highest point on your estimated density.

• Thanks David. That is pretty much what I am doing, and I am using a skewed normal distribution. The only other solution I can think of is using a mixture of parametric densities. – Matteo Fasiolo May 31 '13 at 10:22
• Okay, cool. The steps should be pretty much the same if you use a mixture as your distribution. – David J. Harris May 31 '13 at 15:02
• Except that your mixture might not be unimodal if you're not careful, I suppose. Anyway, good luck! – David J. Harris May 31 '13 at 18:38

Recently we have published a paper suggesting a fast consistent mode estimator.

P.S. Ruzankin and A.V. Logachov (2019). A fast mode estimator in multidimensional space. Statistics & Probability Letters

The estimator has time complexity $$O(dN)$$ for $$N$$ points in $${\mathbb R}^d$$. However, the method is mostly aimed at large sample sizes as well. For sample sizes that are not very large I would recommend some new minimal variance mode estimators from my recent paper

P.S. Ruzankin (2020). A class of nonparametric mode estimators. Communications in Statistics - Simulation and Computation

Those estimators have time complexity $$O(dN^2)$$ for $$N$$ points in $${\mathbb R}^d$$. Please see Section 2.3 there.

• Instead of privately sending links, could you add relevant details to the answer body? – Tim Jan 27 '20 at 11:01