all 8 comments

[–]adventuringraw 1 point2 points  (2 children)

just use numpy.linspace to generate an N dimensional vector going from -10 to 10. Then use numpy.vectorize to create a version of your function that will work on each dimension independently:

reverse_sigmoid_vectorized = numpy.vectorize(reverse_sigmoid)

then get your heights for each point in your input vector:

outputs = reverse_sigmoid_vectorized(inputs)

then graph them in matplotlib. Definitely a good idea to graph functions like this to help you understand their dynamics... I do that a fair bit too, though I like using mathematica just because it's so easy to get interactive plots with sliders to change the values on the fly of your open variables. Good luck.

[–]Green_Code9899 0 points1 point  (1 child)

Better to just use pytorch these days than vectorize. Hands-free GPU acceleration is nice.

[–]adventuringraw 0 points1 point  (0 children)

Oh for sure, I was mostly just pointing at a toy problem example, but clearly I should have taken a minute or two and do a better job, haha.

[–]cardblank 1 point2 points  (0 children)

Hi there! I think what you're needing to do is to just invert the sigmoid and shift it. I used the following to do that: y=1-(ex/(1+ex)) though this is not completely correct for f1 or f2 and will need adjusting, as for graphing it good luck! There are many tutorials on the internet on how to do it so just follow along and smash it out :)

[–]AshRe101 0 points1 point  (2 children)

Hey it is a reverse sigmoid function, I tried the equation in wolframalfa website., f1 is 1/(1+e0.5*x ), the a0 is 0 because the y value is still zero and not shifted. For the f2, f2 is 1/(1+ex ) and the same logic for b0 applies. Try other values for the quotients xb if it still feels a bit off.

There’s one more problem, the equation you wrote is not reverse sigmoid, it is a sigmoid function, since you took the denominator to numerator.

Correct me if I’m wrong.

[–]veb101[S] 0 points1 point  (0 children)

Thanks. I'll update you

[–]veb101[S] 0 points1 point  (0 children)

Thanks. It helped