This package has been deprecated

Author message:

I wrote this module a very long time ago; you should use something else.

linear-autoscale

0.0.0 • Public • Published

linear-autoscale

example

example.js:

var autoscale = require('./index');

var t = autoscale();

var dataset = [-50, 12, 40, 26];

console.log('d: %j', dataset);
console.log('f(d): %j', t(dataset));
console.log('f_inv(f(d)): %j (expect some numerical decay here)',
  t(dataset).inv(t(dataset))
);

output:

$ node example.js 
d: [-50,12,40,26]
f(d): [0,0.6888888888888889,1,0.8444444444444446]
f_inv(f(d)): [-50,11.999999999999996,39.99999999999999,26.000000000000007]
josh@onix:/tmp/scale$ node example.js 
d: [-50,12,40,26]
f(d): [0,0.6888888888888889,1,0.8444444444444446]
f_inv(f(d)): [-50,11.999999999999996,39.99999999999999,26.000000000000007] (expect some numerical decay here)
$

license

MIT/X11

Package Sidebar

Install

npm i linear-autoscale

Weekly Downloads

1

Version

0.0.0

License

MIT/X11

Last publish

Collaborators

  • jesusabdullah