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

@datagrok-libraries/ml

Package Overview
Dependencies
Maintainers
2
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datagrok-libraries/ml - npm Package Compare versions

Comparing version 6.3.54 to 6.3.55

2

package.json

@@ -11,3 +11,3 @@ {

"friendlyName": "Datagrok ML library",
"version": "6.3.54",
"version": "6.3.55",
"description": "Machine learning supporting utilities",

@@ -14,0 +14,0 @@ "dependencies": {

@@ -12,3 +12,3 @@ import { getSimilarityFromDistance } from "../distance-metrics-methods";

const chunkSize = Math.floor(matSize / this._workerCount);
const minThreshold = await this.getMinimalThreshold(values, fnName, opts);
const minThreshold = values.length > 20000 ? await this.getMinimalThreshold(values, fnName, opts) : 0;
if (threshold < minThreshold) {

@@ -101,3 +101,3 @@ console.log(`using threshold ${minThreshold}`);

let threshold = 1 - distance[fractionIndex];
threshold = Math.min(Math.max(threshold, 0.3), 0.9); //capping
threshold = Math.max(threshold, 0.3);
return threshold;

@@ -142,2 +142,2 @@ }

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BhcnNlLW1hdHJpeC1zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3BhcnNlLW1hdHJpeC1zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSx5QkFBeUIsRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQ3hFLE9BQU8sRUFBRSxvQkFBb0IsRUFBeUIsTUFBTSxrQkFBa0IsQ0FBQztBQUMvRSxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sU0FBUyxDQUFDO0FBUWhDLE1BQU0sT0FBTyxtQkFBbUI7SUFFNUI7UUFDRSxJQUFJLENBQUMsWUFBWSxHQUFHLElBQUksQ0FBQyxH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LnZhbHVlcyhCaXRBcnJheU1ldHJpY3NOYW1lcykuc29tZSgoYSkgPT4gYSA9PT0gZm5OYW1lKSA/IGdldFNpbWlsYXJpdHlGcm9tRGlzdGFuY2UodmFsdWUpIDogMSAtIHZhbHVlO1xuICAgICAgICBpZiAoc2ltaWxhcml0eSA+PSB0aHJlc2hvbGQpIHtcbiAgICAgICAgICBpLnB1c2gobWkpO1xuICAgICAgICAgIGoucHVzaChtaik7XG4gICAgICAgICAgZGlzdGFuY2VzLnB1c2godmFsdWUpO1xuICAgICAgICB9XG4gICAgICAgIGNudCsrO1xuICAgICAgICBtaisrO1xuICAgICAgICBpZiAobWogPT09IHZhbHVlcy5sZW5ndGgpIHtcbiAgICAgICAgICBtaSsrO1xuICAgICAgICAgIG1qID0gbWkgKyAxO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgXG4gICAgICBjb25zdCBpQXJyYXkgPSBuZXcgSW50MzJBcnJheShpKTtcbiAgICAgIGNvbnN0IGpBcnJheSA9IG5ldyBJbnQzMkFycmF5KGopO1xuICAgICAgY29uc3QgZGlzdGFuY2VBcnJheSA9IG5ldyBGbG9hdDMyQXJyYXkoZGlzdGFuY2VzKTtcblxuICAgICAgcmV0dXJuIHtpOiBpQXJyYXksIGo6IGpBcnJheSwgZGlzdGFuY2U6IGRpc3RhbmNlQXJyYXl9O1xuICAgIH1cbn0iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BhcnNlLW1hdHJpeC1zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3BhcnNlLW1hdHJpeC1zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSx5QkFBeUIsRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQ3hFLE9BQU8sRUFBRSxvQkFBb0IsRUFBeUIsTUFBTSxrQkFBa0IsQ0FBQztBQUMvRSxPQ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gPSAoe2RhdGE6IHtlcnJvciwgaSwgaiwgZGlzdGFuY2V9fSk6IHZvaWQgPT4ge1xuICAgICAgICAgICAgaWYgKGVycm9yKSB7IFxuICAgICAgICAgICAgICB3b3JrZXJzW2lkeF0udGVybWluYXRlKCk7XG4gICAgICAgICAgICAgIHJlamVjdFdvcmtlcihlcnJvcik7IFxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgd29ya2Vyc1tpZHhdLnRlcm1pbmF0ZSgpO1xuICAgICAgICAgICAgICByZXNvbHZlV29ya2VyKHtpLCBqLCBkaXN0YW5jZSwgaWR4fSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfTtcbiAgICAgICAgfSk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IHJlc3VsdHMgPSBhd2FpdCBQcm9taXNlLmFsbChwcm9taXNlcyk7XG4gICAgICBjb25zdCBmdWxsU2l6ZSA9IHJlc3VsdHMucmVkdWNlKChhY2MsIHZhbCkgPT4gYWNjICsgdmFsLmkubGVuZ3RoLCAwKTtcbiAgICAgIGNvbnN0IGkgPSBuZXcgSW50MzJBcnJheShmdWxsU2l6ZSk7XG4gICAgICBjb25zdCBqID0gbmV3IEludDMyQXJyYXkoZnVsbFNpemUpO1xuICAgICAgY29uc3QgZGlzdGFuY2UgPSBuZXcgRmxvYXQzMkFycmF5KGZ1bGxTaXplKTtcbiAgICAgIGxldCBvZmZzZXQgPSAwO1xuICAgICAgLy8gc2V0dGluZyB0aGUgcmVzdWx0c1xuICAgICAgZm9yIChjb25zdCByZXMgb2YgcmVzdWx0cykge1xuICAgICAgICBpLnNldChyZXMuaSwgb2Zmc2V0KTtcbiAgICAgICAgai5zZXQocmVzLmosIG9mZnNldCk7XG4gICAgICAgIGRpc3RhbmNlLnNldChyZXMuZGlzdGFuY2UsIG9mZnNldCk7XG4gICAgICAgIG9mZnNldCArPSByZXMuaS5sZW5ndGg7XG4gICAgICB9XG4gICAgICByZXR1cm4ge2ksIGosIG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zdFttal0pIDogMDtcbiAgICAgICAgY29uc3QgdmFsdWUgPSAhaXNOaWwodmFsdWVzW21pXSkgJiYgIWlzTmlsKHZhbHVlc1ttal0pID9cbiAgICAgICAgICBkaXN0YW5jZUZuKHZhbHVlc1ttaV0sIHZhbHVlc1ttal0pIDogMTtcbiAgICAgICAgY29uc3Qgc2ltaWxhcml0eSA9IE9iamVjdC52YWx1ZXMoQml0QXJyYXlNZXRyaWNzTmFtZXMpLnNvbWUoKGEpID0+IGEgPT09IGZuTmFtZSkgPyBnZXRTaW1pbGFyaXR5RnJvbURpc3RhbmNlKHZhbHVlKSA6IDEgLSB2YWx1ZTtcbiAgICAgICAgaWYgKHNpbWlsYXJpdHkgPj0gdGhyZXNob2xkKSB7XG4gICAgICAgICAgaS5wdXNoKG1pKTtcbiAgICAgICAgICBqLnB1c2gobWopO1xuICAgICAgICAgIGRpc3RhbmNlcy5wdXNoKHZhbHVlKTtcbiAgICAgICAgfVxuICAgICAgICBjbnQrKztcbiAgICAgICAgbWorKztcbiAgICAgICAgaWYgKG1qID09PSB2YWx1ZXMubGVuZ3RoKSB7XG4gICAgICAgICAgbWkrKztcbiAgICAgICAgICBtaiA9IG1pICsgMTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIFxuICAgICAgY29uc3QgaUFycmF5ID0gbmV3IEludDMyQXJyYXkoaSk7XG4gICAgICBjb25zdCBqQXJyYXkgPSBuZXcgSW50MzJBcnJheShqKTtcbiAgICAgIGNvbnN0IGRpc3RhbmNlQXJyYXkgPSBuZXcgRmxvYXQzMkFycmF5KGRpc3RhbmNlcyk7XG5cbiAgICAgIHJldHVybiB7aTogaUFycmF5LCBqOiBqQXJyYXksIGRpc3RhbmNlOiBkaXN0YW5jZUFycmF5fTtcbiAgICB9XG59Il19

@@ -35,3 +35,3 @@ import { isNil } from './utils';

mj += increment;
while (mj >= values.length) {
while (mj >= values.length && cnt < chunkSize) {
mi++;

@@ -50,2 +50,2 @@ mj = mi + 1 + (mj - values.length);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oZGlzdGFuY2VBcnJheUNvdW50ZXIgPCBzYW1wbGVMZW5ndGgpIHtcbiAgICAgIGRpc3RhbmNlcyA9IGRpc3RhbmNlcy5zbGljZSgwLCBkaXN0YW5jZUFycmF5Q291bnRlcik7XG4gICAgfVxuICAgIHBvc3RNZXNzYWdlKHtkaXN0YW5jZTogZGlzdGFuY2VzfSk7XG4gIH0gY2F0Y2ggKGUpIHtcbiAgICBwb3N0TWVzc2FnZSh7ZXJyb3I6IGV9KTtcbiAgfVxufTsiXX0=
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