Socket
Socket
Sign inDemoInstall

@kobra-dev/multivariate-linear-regression

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kobra-dev/multivariate-linear-regression

Multivariate linear regression


Version published
Maintainers
3
Created
Source

ml-regression-multivariate-linear

NPM version build status npm download

Multivariate linear regression.

Installation

npm install --save ml-regression-multivariate-linear

API

new MLR(x, y[, options])

Arguments

  • x: Matrix containing the inputs
  • y: Matrix containing the outputs

Options

  • intercept: boolean indicating if intercept terms should be computed (default: true)
  • statistics: boolean for calculating and returning regression statistics (default: true)

Usage

import MLR from "ml-regression-multivariate-linear";

const x = [
  [0, 0],
  [1, 2],
  [2, 3],
  [3, 4]
];
// Y0 = X0 * 2, Y1 = X1 * 2, Y2 = X0 + X1
const y = [
  [0, 0, 0],
  [2, 4, 3],
  [4, 6, 5],
  [6, 8, 7]
];
const mlr = new MLR(x, y);
console.log(mlr.predict([3, 3]));
// [6, 6, 6]

License

MIT

FAQs

Package last updated on 08 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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