Socket
Socket
Sign inDemoInstall

vega-regression

Package Overview
Dependencies
Maintainers
4
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vega-regression

Regression transform for Vega dataflows.


Version published
Weekly downloads
136K
decreased by-0.62%
Maintainers
4
Weekly downloads
 
Created

What is vega-regression?

The vega-regression npm package provides tools for performing regression analysis on datasets. It supports various types of regression models, including linear, exponential, logarithmic, and polynomial regressions. This package is particularly useful for data visualization and analysis within the Vega ecosystem.

What are vega-regression's main functionalities?

Linear Regression

This feature allows you to perform linear regression on a dataset. The code sample demonstrates how to use the vega-regression package to fit a linear model to a set of data points and predict values.

const vega = require('vega-regression');
const data = [ [0, 1], [1, 3], [2, 5], [3, 7] ];
const model = vega.regression('linear').data(data).predict();
console.log(model);

Exponential Regression

This feature allows you to perform exponential regression on a dataset. The code sample demonstrates how to use the vega-regression package to fit an exponential model to a set of data points and predict values.

const vega = require('vega-regression');
const data = [ [0, 1], [1, 2.7], [2, 7.4], [3, 20.1] ];
const model = vega.regression('exponential').data(data).predict();
console.log(model);

Logarithmic Regression

This feature allows you to perform logarithmic regression on a dataset. The code sample demonstrates how to use the vega-regression package to fit a logarithmic model to a set of data points and predict values.

const vega = require('vega-regression');
const data = [ [1, 0], [2, 1.1], [3, 1.8], [4, 2.3] ];
const model = vega.regression('log').data(data).predict();
console.log(model);

Polynomial Regression

This feature allows you to perform polynomial regression on a dataset. The code sample demonstrates how to use the vega-regression package to fit a polynomial model of degree 2 to a set of data points and predict values.

const vega = require('vega-regression');
const data = [ [0, 1], [1, 6], [2, 17], [3, 34] ];
const model = vega.regression('poly', 2).data(data).predict();
console.log(model);

Other packages similar to vega-regression

Keywords

FAQs

Package last updated on 14 Jun 2024

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