The Softmax Function
  • JavaScript 100%
Find a file
2016-06-27 15:18:38 -04:00
spec remove invalid value checks 2016-06-27 02:27:16 -04:00
.gitattributes 👾 Added .gitattributes & .gitignore files 2016-06-26 01:49:00 -04:00
.gitignore ignore logs 2016-06-26 02:39:55 -04:00
.npmignore Setup example 2016-06-26 11:53:51 -04:00
index.js compact functions 2016-06-27 02:30:33 -04:00
LICENSE.md Separate softmax into its own project 2016-06-26 02:17:25 -04:00
package.json 1.0.8 2016-06-27 02:31:23 -04:00
README.md Remove link to gh pages 2016-06-27 15:18:38 -04:00

Softmax Function

The Softmax function

Example

let softmax = require('softmax-fn');

softmax([1]);
// [1]

softmax([1, 2, 4.3]);
// [0.03243497033829723, 0.08816739047720148, 0.8793976391845013]

Installation

$ npm install softmax-fn

API

var softmax = require('softmax-fn');

softmax(values)

  • parameter {number[]} values: A list of numbers ranging from -10 to 10.
  • returns {number[]}: A normalized list of entries between 0 and 1 where the sum is 1.