Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mse

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mse

MSE: Mean squared error estimator

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

mse

Mean squared error function
http://en.wikipedia.org/wiki/Mean_square_error

example

var mse = require('mse');
var data_1 = [
    188, 100, 114, 171, 171, 173, 230, 149,
    191,  81,  61,  62, 127, 217,  62,  81, 
    178, 159, 245,  18,   9,  86, 201, 166,
    122, 210,   4, 182,  15,  18, 135, 203,
    222, 134, 154,  21,  71, 217,  48, 153,
    113, 234, 207, 119,  51,  61, 149, 222, 
    186,  38, 158,  79, 185,   1, 118, 222,
     22, 137, 110, 206,  94, 120, 163, 241
]; 

var data_2 = [
    188, 100, 114, 171, 171, 173, 230, 149,
    191,  81,  61,  62, 123, 217,  62,  81, 
    178, 159, 245,  18,   9,  86, 201, 166,
    122, 210,   4, 200,  15,  18, 135, 203,
    222, 134, 154,  21,  71, 217,  48, 153,
    113, 234, 207, 119,  51,  61, 149, 222, 
    186,  38, 158,  79, 185,   1, 118, 222,
     22, 137, 110, 206,  94, 120, 163, 241
]; 

var result = mse(data_1, data_2); /* results in a calcuation of 5.3125 */
if (result <> 0) {
    console.log('data sets are different by ' + result);
}

license

MIT

Keywords

FAQs

Package last updated on 30 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc