in reply to Re^3: A data selection problem(in3D).(Dammit! New requirement.)
in thread A data selection problem(in3D).
Suggestion 1: given a parameter p that goes from -1 to 1, non-inclusive, you could do f(p) = tan(p*pi/2), but that doesn't give much control of the slopes. Given the logistic(p,L,K) = L / (1 + exp(-k*p)), you could do something like f(p) = tan( (2*logistic(p,L,K)-1)*pi/2 ), which allows some tuning... but I'm still not sure it's really tunable enough
Thanks. I'll take a look at that.
I'm currently playing with tanh(), which produces a knee that bends in the right direction; and the slope can be tuned by simple scaling, but...as it contains a division, 1.0 has to be special cased to avoid divide by zero; and as it is basically log, you have to remove then put back the negative to produce the 'other half' of the curve.
The latter is simple if a little messy; the former is a right royal pain the arse.
|
|---|