ml-regression-base
Advanced tools
Comparing version
# Changelog | ||
### [2.1.6](https://www.github.com/mljs/regression-base/compare/v2.1.5...v2.1.6) (2022-01-21) | ||
### Bug Fixes | ||
* update dependencies ([da93a3a](https://www.github.com/mljs/regression-base/commit/da93a3a683d5931edce5c77eb6ef420de5a6ba6d)) | ||
### [2.1.5](https://www.github.com/mljs/regression-base/compare/v2.1.4...v2.1.5) (2021-11-16) | ||
@@ -4,0 +11,0 @@ |
@@ -7,6 +7,2 @@ 'use strict'; | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var isAnyArray__default = /*#__PURE__*/_interopDefaultLegacy(isAnyArray); | ||
function maybeToPrecision(value, digits) { | ||
@@ -30,3 +26,3 @@ if (value < 0) { | ||
function checkArraySize(x, y) { | ||
if (!isAnyArray__default["default"](x) || !isAnyArray__default["default"](y)) { | ||
if (!isAnyArray.isAnyArray(x) || !isAnyArray.isAnyArray(y)) { | ||
throw new TypeError('x and y must be arrays'); | ||
@@ -49,3 +45,3 @@ } | ||
return this._predict(x); | ||
} else if (isAnyArray__default["default"](x)) { | ||
} else if (isAnyArray.isAnyArray(x)) { | ||
const y = []; | ||
@@ -84,3 +80,3 @@ for (let i = 0; i < x.length; i++) { | ||
score(x, y) { | ||
if (!isAnyArray__default["default"](x) || !isAnyArray__default["default"](y) || x.length !== y.length) { | ||
if (!isAnyArray.isAnyArray(x) || !isAnyArray.isAnyArray(y) || x.length !== y.length) { | ||
throw new Error('x and y must be arrays of the same length'); | ||
@@ -87,0 +83,0 @@ } |
{ | ||
"name": "ml-regression-base", | ||
"version": "2.1.5", | ||
"version": "2.1.6", | ||
"description": "Base class for regression modules", | ||
@@ -38,12 +38,12 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"is-any-array": "^1.0.1" | ||
"is-any-array": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/plugin-transform-modules-commonjs": "^7.15.4", | ||
"eslint": "^7.22.0", | ||
"eslint-config-cheminfo": "^6.0.1", | ||
"jest": "^27.2.5", | ||
"prettier": "^2.4.1", | ||
"rollup": "^2.58.0" | ||
"@babel/plugin-transform-modules-commonjs": "^7.16.8", | ||
"eslint": "^8.7.0", | ||
"eslint-config-cheminfo": "^7.2.1", | ||
"jest": "^27.4.7", | ||
"prettier": "^2.5.1", | ||
"rollup": "^2.65.0" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
import isAnyArray from 'is-any-array'; | ||
import { isAnyArray } from 'is-any-array'; | ||
@@ -3,0 +3,0 @@ export default function checkArraySize(x, y) { |
@@ -1,2 +0,2 @@ | ||
import isAnyArray from 'is-any-array'; | ||
import { isAnyArray } from 'is-any-array'; | ||
@@ -3,0 +3,0 @@ export { default as maybeToPrecision } from './maybeToPrecision'; |
17363
0.06%351
-0.57%+ Added
- Removed
Updated