How to pick/transform a logistic function?

Zermelo

Junior Member
Joined
Jan 7, 2021
Messages
148
Hi there, I'm working on an algorithm that takes in a distance between two locations, and outputs a "score" (I'm comparing 2 business datasets as part of a Data Analysis internship), and I want to use a sort of 'S'-shaped logistic curve, that outputs 20 if the distance is near to 0, outputs 0 if distance is let's say [math]x_0 = 200[/math], and outputs - 10 for larger distances. I tried modifying the standard sigmoid, and got a function: [math]f(x) = \frac{-30}{1 + e^{k(x-n)}} + l[/math]. I want it to be pretty steep at the beginning, let's say it outputs 5 for a distance of 100, but I can't get it to do what I want. I tried parameters: [math]k = \frac{1}{50}, x_0 = 200[/math], but it isn't steep enough around the desired point, and if I tweek the parameters k and l, the curve gets the desired slope near the root x0 and gets really elongated around x = 0. I worked out the expression for n, if given k and x0, [math]n = \frac{1}{k} \cdot \ln (e^{kx_0}(\frac{30}{l} + 1))[/math].
I have virtualy 0 experience in dealing with this, can someone reccomend a different function, or a way of doing this?
 
Hi Zermelo. Can you sketch a graph for us showing how you'd like the curve of f(x) to behave over your domain?

?
 
Could you post a free-hand sketch on a piece of graph paper showing a curve similar to what you are looking for?
I now see Otis has requested rhe same thing.
 
Top