# How to define a dimensionless Objective function for determining how peaked a curve is?

I have attached 2 plots for FFT spectra. One is considered good and one is bad.

The good one is classified on the basis of how closely spaced the frequencies and the bad is based on how multiple frequencies are present.

I am trying to determine a dimensionless objective function that could be maximized or minimized so as to lean towards which is a better plot (Good FFT). One function which is consistent for a particular scale is Max. Power/standard deviation. But this is not a dimensionless quantity.

I would like to determine a dimensionless quantity.  EDIT: Assuming the spectrum is similar to a probability distribution: $$\frac{E}{\int_\Omega|f(\omega)|d\omega}$$

where E is the max. Amplitude of the PSD.

I am investigating other definitions of spread besides: $$\omega_{max} - \omega_{min}$$

The objective function proposed by whpowell96 does not seem working generally enough. I identified these 3 properties of a spread:

1. Given the same shape of spectrum, only by changing number of sample of fft changes $$\omega_{max}-\omega_{min}$$, and so it gives different peakness for the same spectrum

2. It is not scale invariant for a triangle spectrum with larger height and same base (you get same objective function while peakness is clearly differernt). See figure below 3. By scaling up the spectrum (e.g. twice larger in both dimensions), I am expecting to have the same objective function since the peakness is unchanged. I am investigating other definition of spread instead of $$\omega_{max} - \omega_{min}$$. Basically I am generalizing whpowell96 's objective function with:

$$\frac{\|f\|_{L^\infty}\|f\|_{L^0}}{\|f\|_{L^1}} = \frac{\mathrm{max}_{\omega\in\Omega} f(\omega)\cdot|\Omega|}{\int_\Omega|f(\omega)|d\omega}.$$ Basically replacing $$\Omega$$ with a measure of Statistical dispersion such as (i) IQR (ii) standard deviation, (iii)Mean absolute deviation. It is easy to show that IQR satisfies point 3 but not point 2. I am investigating the other measures.

• We can't see filenames, so it is better that you add the information describing the plots. May 27, 2020 at 3:24
• Also, there are many choices for nondimensional numbers, so it would be a good idea if you describe what you need them for. May 27, 2020 at 3:25
• Hi, The top one has lot more frequencies, so it is a bad FFT based on what I want to achieve and the bottom one is a good FFT. May 28, 2020 at 10:40

Let $$f(\omega)$$ be your power spectrum. Then maybe something like $$\frac{\|f\|_{L^\infty}\|f\|_{L^0}}{\|f\|_{L^1}} = \frac{\mathrm{max}_{\omega\in\Omega} f(\omega)\cdot|\omega_{max}-\omega_{min}|}{\int_\Omega|f(\omega)|d\omega}.$$ I know that $$L^0$$ isn't really good notation but I think it is useful for presenting this. This quantity is minimized by constant functions and takes the value $$1$$ there. This can be interpreted as the ratio between the area of the rectangle formed by the support of your spectrum times the largest value and the true area under the power spectrum, so it will heavily penalize spikes. It is also dimensionless, as required. The only part that takes some work is discretizing the denominator but since I assume you have uniformly discretized frequencies you can just use something like $$\int_\Omega|f(\omega)|d\omega\approx\Delta\omega\sum_{i=1}^N|f_i|.$$
Edit: $$|\omega_{max}-\omega_{min}|$$ is actually incorrect in my initial answer. This should instead be an estimate of the measure of $$\mathrm{supp}(f)$$, i.e., the places where $$f$$ is nonzero. This requires more work to quantify and likely requires some sort of tolerance to determine what values of $$f$$ are close enough to zero to be counted as zero. This should fix problems 1 and I believe 3 in your edit. I'm unsure of how to fix problem 2 but my intuition says that these triangular examples are close to worst-case scenarios for this metric since for this family of functions, $$\|f\|_{L^1}$$ is exactly proportional to $$\|f\|_{L^{\infty}}$$