# ml-baseline-correction-regression

> Iterative regression based baseline correction

Latest version **2.0.2** (published 2026-05-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install ml-baseline-correction-regression
pnpm add ml-baseline-correction-regression
yarn add ml-baseline-correction-regression
bun add ml-baseline-correction-regression
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2026-05-01 |
| First published | 2017-06-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 8.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Miguel Asencio |
| Maintainers | stropitek, targos, lpatiny, mljs-bot, maasencioh, andcastillo |

## Links

- npm: https://www.npmjs.com/package/ml-baseline-correction-regression
- Repository: https://github.com/mljs/baseline-correction-regression
- Homepage: https://github.com/mljs/baseline-correction-regression#readme
- Issues: https://github.com/mljs/baseline-correction-regression/issues
- npm.io page: https://npm.io/package/ml-baseline-correction-regression

## Dependencies (1)

- [ml-regression-polynomial](https://npm.io/package/ml-regression-polynomial.md) ^4.0.0

## Recent versions

- 2.0.2 (latest) — 2026-05-01
- 2.0.1 — 2024-05-17
- 2.0.0 — 2024-05-17
- 1.0.3 — 2024-05-06
- 1.0.2 — 2023-05-23
- 1.0.0 — 2021-03-24
- 0.3.0 — 2020-02-08
- 0.2.0 — 2020-02-04
- 0.1.0 — 2017-06-21

## README

# baseline-correction-regression

[![NPM version][npm-image]][npm-url]
[![build status][ci-image]][ci-url]
[![Test coverage][codecov-image]][codecov-url]
[![npm download][download-image]][download-url]

Iterative regression-based baseline correction.

The algorithm is based on the document [_Baseline correction by improved iterative polynomial fitting with automatic threshold_](https://doi.org/10.1016/j.chemolab.2005.08.009)

## Installation

`$ npm i ml-baseline-correction-regression`

## Usage

```js
import baselineCorrection from 'ml-baseline-correction-regression';

let time = [
  /* ... */
];
let originalSignal = [
  /* ... */
];
const { corrected, delta, iteration, baseline } = baselineCorrection(
  time,
  originalSignal,
);
```

## [API Documentation](https://mljs.github.io/baseline-correction-regression/)

## License

[MIT](./LICENSE)

[npm-image]: https://img.shields.io/npm/v/ml-baseline-correction-regression.svg
[npm-url]: https://npmjs.org/package/ml-baseline-correction-regression
[codecov-image]: https://img.shields.io/codecov/c/github/mljs/baseline-correction-regression.svg
[codecov-url]: https://codecov.io/gh/mljs/baseline-correction-regression
[ci-image]: https://github.com/mljs/baseline-correction-regression/workflows/Node.js%20CI/badge.svg?branch=main
[ci-url]: https://github.com/mljs/baseline-correction-regression/actions?query=workflow%3A%22Node.js+CI%22
[download-image]: https://img.shields.io/npm/dm/ml-baseline-correction-regression.svg
[download-url]: https://npmjs.org/package/ml-baseline-correction-regression

---
_Source: https://npm.io/package/ml-baseline-correction-regression · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
