Socket
Socket
Sign inDemoInstall

@nlpjs/neural

Package Overview
Dependencies
1
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.9.2 to 4.9.3

6

package.json
{
"name": "@nlpjs/neural",
"version": "4.9.2",
"version": "4.9.3",
"description": "Neural Network",

@@ -28,5 +28,5 @@ "author": {

"dependencies": {
"@nlpjs/core": "^4.9.2"
"@nlpjs/core": "^4.9.3"
},
"gitHead": "956809b1d31b96962f588bff97aef9b73794af4d"
"gitHead": "defca61ee1127e88d73a0808c544028fa4f0e7f5"
}

@@ -81,15 +81,7 @@ /*

runInputPerceptron(perceptron, input) {
const { weights, bias } = perceptron;
let sum = bias;
for (let i = 0; i < input.keys.length; i += 1) {
const key = input.keys[i];
if (weights[key]) {
if (input.data[key] === 1) {
sum += weights[key];
} else {
sum += input.data[key] * weights[key];
}
}
}
return sum < 0 ? 0 : this.settings.alpha * sum;
const sum = input.keys.reduce(
(prev, key) => prev + input.data[key] * perceptron.weights[key],
perceptron.bias
);
return sum <= 0 ? 0 : this.settings.alpha * sum;
}

@@ -96,0 +88,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc