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

ml-regression-polynomial

Package Overview
Dependencies
Maintainers
6
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ml-regression-polynomial - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

5

History.md

@@ -0,1 +1,6 @@

<a name="1.0.2"></a>
## [1.0.2](https://github.com/mljs/regression-polynomial/compare/v1.0.1...v1.0.2) (2017-04-28)
<a name="1.0.1"></a>

@@ -2,0 +7,0 @@ ## [1.0.1](https://github.com/mljs/regression-polynomial/compare/v1.0.0...v1.0.1) (2017-04-28)

11

lib/index.js

@@ -18,8 +18,4 @@ 'use strict';

} else {
const n = x.length;
if (n !== y.length) {
throw new RangeError('input and output array have a different length');
}
regress(this, x, y, degree, n);
BaseRegression.checkArrayLength(x, y);
regress(this, x, y, degree);
}

@@ -101,3 +97,4 @@ }

function regress(pr, x, y, degree, n) {
function regress(pr, x, y, degree) {
const n = x.length;
let powers;

@@ -104,0 +101,0 @@ if (Array.isArray(degree)) {

{
"name": "ml-regression-polynomial",
"version": "1.0.1",
"version": "1.0.2",
"description": "Polynomial Regression",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -23,2 +23,3 @@ # regression-polynomial

const regression = new PolynomialRegression(x, y, degree);
console.log(regression.predict(80)); // Apply the model to some x value. Prints 2.6.

@@ -25,0 +26,0 @@ console.log(regression.coefficients); // Prints the coefficients in increasing order of power (from 0 to degree).

@@ -1,2 +0,2 @@

import BaseRegression, {maybeToPrecision} from 'ml-regression-base';
import BaseRegression, {checkArrayLength, maybeToPrecision} from 'ml-regression-base';
import Matrix, {solve} from 'ml-matrix';

@@ -12,8 +12,4 @@

} else {
const n = x.length;
if (n !== y.length) {
throw new RangeError('input and output array have a different length');
}
regress(this, x, y, degree, n);
checkArrayLength(x, y);
regress(this, x, y, degree);
}

@@ -95,3 +91,4 @@ }

function regress(pr, x, y, degree, n) {
function regress(pr, x, y, degree) {
const n = x.length;
let powers;

@@ -98,0 +95,0 @@ if (Array.isArray(degree)) {

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