ml-regression-base
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -0,1 +1,11 @@ | ||
<a name="1.2.0"></a> | ||
# [1.2.0](https://github.com/mljs/regression-base/compare/v1.1.1...v1.2.0) (2017-04-28) | ||
### Features | ||
* add checkArrayLength method ([3cc5515](https://github.com/mljs/regression-base/commit/3cc5515)) | ||
<a name="1.1.1"></a> | ||
@@ -2,0 +12,0 @@ ## [1.1.1](https://github.com/mljs/regression-base/compare/v1.1.0...v1.1.1) (2017-04-28) |
@@ -22,2 +22,11 @@ 'use strict'; | ||
function checkArraySize(x, y) { | ||
if (!Array.isArray(x) || !Array.isArray(y)) { | ||
throw new TypeError('x and y must be arrays'); | ||
} | ||
if (x.length !== y.length) { | ||
throw new RangeError('x and y arrays must have the same length'); | ||
} | ||
} | ||
class BaseRegression { | ||
@@ -109,1 +118,2 @@ constructor() { | ||
exports.maybeToPrecision = maybeToPrecision; | ||
exports.checkArrayLength = checkArraySize; |
{ | ||
"name": "ml-regression-base", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "Base class for regression modules", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -35,6 +35,11 @@ # regression-base | ||
This package also exports a convenience method to transform numbers to readable strings.<br /> | ||
Convenience method to transform numbers to readable strings.<br /> | ||
If digits is not specified, "value.toString()" is used. Otherwise "value.toPrecision(digits)" is used.<br /> | ||
This method can be used to implement `toString()` or `toLaTeX()`. | ||
### `checkArrayLength(x, y)` | ||
Convenience method to check if the input and output arrays passed to a regression | ||
constructor are effectively arrays with the same length. | ||
## License | ||
@@ -41,0 +46,0 @@ |
export {default as maybeToPrecision} from './maybeToPrecision'; | ||
export {default as checkArrayLength} from './checkArrayLength'; | ||
@@ -3,0 +4,0 @@ export default class BaseRegression { |
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
14459
11
309
54