Here’s a simple sigmoid function showing a logistic curve written in javascript

function sigmoid(t) { return 1/(1+Math.pow(Math.E, -t)); }

Here’s a simple sigmoid function showing a logistic curve written in javascript

function sigmoid(t) { return 1/(1+Math.pow(Math.E, -t)); }

## One response to “A JavaScript Sigmoid Function”

Instead of “Math.pow(Math.E, -t)” you can use “Math.exp(-t)”