Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ml-regression-base

Package Overview
Dependencies
Maintainers
7
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ml-regression-base - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

src/__tests__/checkArraySize.js

10

History.md

@@ -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;

2

package.json
{
"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 {

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