@nlpjs/utils
Advanced tools
Comparing version 4.17.8 to 4.17.9
{ | ||
"name": "@nlpjs/utils", | ||
"version": "4.17.8", | ||
"version": "4.17.9", | ||
"description": "NLP utils", | ||
@@ -30,3 +30,3 @@ "author": { | ||
}, | ||
"gitHead": "2986658b5f578ff2ec45488204a3ef8e9535d427", | ||
"gitHead": "36bbe0e53f44100a158407199cb415a45792b06a", | ||
"dependencies": { | ||
@@ -33,0 +33,0 @@ "@nlpjs/xtables": "^4.17.0", |
@@ -65,6 +65,14 @@ /* | ||
if (value < lower) { | ||
return Math.log(lower) / Math.log(lower - value); | ||
const logDelta = Math.log(lower - value); | ||
if (logDelta === 0) { | ||
return 1; | ||
} | ||
return Math.log(Math.abs(lower)) / logDelta; | ||
} | ||
if (value > upper) { | ||
return Math.log(1 - upper) / Math.log(value - upper); | ||
const logDelta = Math.log(value - upper); | ||
if (logDelta === 0) { | ||
return 1; | ||
} | ||
return Math.log(Math.min(0, 1.5 - upper)) / logDelta; | ||
} | ||
@@ -71,0 +79,0 @@ return 0; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58916
1591