How to display curve without exponential peaks

46 Views Asked by At

My input data normally contains values in [-1,+1], but contains exponential peaks. I'd like to use logarithms to reduce the peaks, but don't know how as my data contains negative values. Is there some function similar to log that I can use, or how does one normally do this kind of thing?

2

There are 2 best solutions below

0
On BEST ANSWER

A slight modification of the suggestion by Hagen Knaf might do the trick:

$f(x)=\frac{x}{1+\sqrt{|x|}}$

The peaks will be there, but reduced. If your data is actually exponential in nature (very uncommon), it won't work of course. Otherwise you might get something like this:

enter image description here

3
On

Your explanation seems to suggest that you don't really want to remove the peaks, that is remove the corresponding data like one sometimes does with outliers, but you want to rescale in a nonlinear way. You could use something like $f(x)=\mathrm{sign}(x)\log(|x|+1)$, where $\mathrm{sign}$ is the sign of $x$.

Another possibility, which always yields values in $[-1,1]$ is given by $g(x)=\frac{x}{1+|x|}$.

Of course a main issue is the amount of contraction that is acceptable for the "normal" data. $g$ is worse than $f$ in that respect.