z-score

1.0.6 • Public • Published

Z-Score

Calculates the z-score (also known as standard score, z-value and normal score) for numeric object attributes.

Installation

npm install z-score

Usage

var ZScore = require('z-score').default
var zScore = new ZScore()
zScore.train([{
  temperature: 30,
  pressure: 1130
}, {
  temperature: 20,
  pressure: 1126
}])
var result = zScore.calculate({
  temperature: 15,
  pressure: 1122
})
expect(result).to.deep.equal({ 
  pressure: -3,
  temperature: -2 
})

Readme

Keywords

none

Package Sidebar

Install

npm i z-score

Weekly Downloads

37

Version

1.0.6

License

MIT

Unpacked Size

10.6 kB

Total Files

11

Last publish

Collaborators

  • zeikko