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

gaussianMixture

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gaussianMixture - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

8

index.js

@@ -107,3 +107,3 @@ 'use strict';

// If there is a separation prior:
if (this.options.separationPrior && this.options.priorRelevance) {
if (this.options.separationPrior && this.options.separationPriorRelevance) {
var separationPrior = this.options.separationPrior;

@@ -114,3 +114,3 @@ var priorMeans = _.range(this.nComponents).map(function (a) { return (a * separationPrior); });

for (k = 0; k < this.nComponents; k++) {
alpha = this.weights[k] / (this.weights[k] + this.options.priorRelevance);
alpha = this.weights[k] / (this.weights[k] + this.options.separationPriorRelevance);
this.means[k] = center + alpha * (this.means[k] - center) + (1 - alpha) * (priorMeans[k] - priorCenter);

@@ -128,4 +128,4 @@ }

// If there is a variance prior:
if (this.options.variancePrior && this.options.priorRelevance) {
alpha = this.weights[k] / (this.weights[k] + this.options.priorRelevance);
if (this.options.variancePrior && this.options.variancePriorRelevance) {
alpha = this.weights[k] / (this.weights[k] + this.options.variancePriorRelevance);
this.vars[k] = alpha * this.vars[k] + (1 - alpha) * this.options.variancePrior;

@@ -132,0 +132,0 @@ }

{
"name": "gaussianMixture",
"version": "0.5.0",
"version": "0.5.1",
"description": "An implementation of a Gaussian Mixture class in one dimension, that allows to fit models with an Expectation Maximization algorithm.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -111,11 +111,11 @@ 'use strict';

variancePrior: 3,
priorRelevance: 0.01
variancePriorRelevance: 0.01
};
var options2 = {
variancePrior: 3,
priorRelevance: 1
variancePriorRelevance: 1
};
var options3 = {
variancePrior: 3,
priorRelevance: 1000000
variancePriorRelevance: 1000000
};

@@ -140,11 +140,11 @@ var gmm = new GMM(3, undefined, [-1, 13, 25], [1, 1, 1], options);

separationPrior: 3,
priorRelevance: 0.01
separationPriorRelevance: 0.01
};
var options2 = {
separationPrior: 3,
priorRelevance: 1
separationPriorRelevance: 1
};
var options3 = {
separationPrior: 3,
priorRelevance: 1000000
separationPriorRelevance: 1000000
};

@@ -151,0 +151,0 @@ var gmm = new GMM(3, undefined, [-1, 13, 25], [1, 1, 1], options);

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