New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gradient-descent

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gradient-descent - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

5

index.js

@@ -32,3 +32,4 @@ /* eslint-disable no-await-in-loop */

for (let index = 0; index < space_dim; index++) {
x_n[index] += DELTA_SIZE;
step = (Math.random() || 1) * DELTA_SIZE
x_n[index] += step;
const Error_n = await get_error(...x_n);

@@ -42,3 +43,3 @@ const numerical_derivate = get_numerical_derivate(

derivate.push(numerical_derivate);
x_n[index] -= DELTA_SIZE;
x_n[index] -= step;
}

@@ -45,0 +46,0 @@

2

package.json
{
"name": "gradient-descent",
"version": "1.0.3",
"version": "1.0.4",
"description": "",

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

@@ -9,6 +9,4 @@ const assert = require('assert');

const res = await optimize(init, func);
console.log('res ', res);
assert(await func(...res) < await func(...init));
});
});
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