# ml-airpls

> Baseline correction using adaptive iteratively reweighted penalized least

Latest version **2.2.0** (published 2026-04-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install ml-airpls
pnpm add ml-airpls
yarn add ml-airpls
bun add ml-airpls
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2026-04-20 |
| First published | 2018-11-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 3 |
| Unpacked size | 32.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Jose Alejandro Bolanos Arroyave |
| Maintainers | stropitek, targos, lpatiny, mljs-bot |
| Keywords | baseline, correction |

## Links

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

## Dependencies (3)

- [cuthill-mckee](https://npm.io/package/cuthill-mckee.md) ^1.0.0
- [cheminfo-types](https://npm.io/package/cheminfo-types.md) ^1.14.0
- [ml-spectra-processing](https://npm.io/package/ml-spectra-processing.md) ^14.26.0

## Recent versions

- 2.2.0 (latest) — 2026-04-20
- 2.1.1 — 2026-04-02
- 2.1.0 — 2026-03-27
- 2.0.0 — 2024-05-03
- 1.0.3 — 2023-12-05
- 1.0.2 — 2023-05-23
- 1.0.0 — 2021-03-24
- 0.2.0 — 2020-02-05
- 0.0.2 — 2018-11-03

## README

# airpls

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

Baseline correction using adaptive iteratively reweighted penalized least squares

It is an javascript implementation of [airpls](https://github.com/zmzhang/airPLS/blob/main/airPLS_manuscript.pdf) using cholesky decomposition and reverse Cuthill-Mckee method for reducing the bandwidth of sparse linear systems, obtaining a fast baseline fitter. 

## Installation

`$ npm install ml-airpls`

## [API Documentation](https://mljs.github.io/airpls/)

## Example

```js
const airpls = require('ml-airpls');

let y = [1, 1, 1, 1, 3, 6, 3, 1, 1, 1];
let x = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];

var {baseline, corrected, iteration, error} = airpls(x, y);
```

## License

[MIT](./LICENSE)

[npm-image]: https://img.shields.io/npm/v/ml-airpls.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/ml-airpls
[codecov-image]: https://img.shields.io/codecov/c/github/mljs/airpls.svg?style=flat-square
[codecov-url]: https://codecov.io/gh/mljs/airpls
[download-image]: https://img.shields.io/npm/dm/ml-airpls.svg?style=flat-square
[download-url]: https://www.npmjs.com/package/ml-airpls

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