Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/stdlib-js/stats-iter

Standard library functions for computing statistics over iterators.
https://github.com/stdlib-js/stats-iter

iter iteration iterator iterators javascript lib library math mathematics node node-js nodejs standard statistics stats stdlib

Last synced: 16 days ago
JSON representation

Standard library functions for computing statistics over iterators.

Awesome Lists containing this project

README

        


About stdlib...

We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.


The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.


When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.


To join us in bringing numerical computing to the web, get started by checking us out on GitHub, and please consider financially supporting stdlib. We greatly appreciate your continued support!

# Iterator Statistics

[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url]

> Statistical function iterators.

## Installation

```bash
npm install @stdlib/stats-iter
```

Alternatively,

- To load the package in a website via a `script` tag without installation and bundlers, use the [ES Module][es-module] available on the [`esm`][esm-url] branch (see [README][esm-readme]).
- If you are using Deno, visit the [`deno`][deno-url] branch (see [README][deno-readme] for usage intructions).
- For use in Observable, or in browser/node environments, use the [Universal Module Definition (UMD)][umd] build available on the [`umd`][umd-url] branch (see [README][umd-readme]).

The [branches.md][branches-url] file summarizes the available branches and displays a diagram illustrating their relationships.

To view installation and usage instructions specific to each branch build, be sure to explicitly navigate to the respective README files on each branch, as linked to above.

## Usage

```javascript
var ns = require( '@stdlib/stats-iter' );
```

#### ns

Namespace containing functions for computing statistics over iterators.

```javascript
var o = ns;
// returns {...}
```

- [`itercugmean( iterator )`][@stdlib/stats/iter/cugmean]: create an iterator which iteratively computes a cumulative geometric mean.
- [`itercuhmean( iterator )`][@stdlib/stats/iter/cuhmean]: create an iterator which iteratively computes a cumulative harmonic mean.
- [`itercumax( iterator )`][@stdlib/stats/iter/cumax]: create an iterator which iteratively computes a cumulative maximum value.
- [`itercumaxabs( iterator )`][@stdlib/stats/iter/cumaxabs]: create an iterator which iteratively computes a cumulative maximum absolute value.
- [`itercumean( iterator )`][@stdlib/stats/iter/cumean]: create an iterator which iteratively computes a cumulative arithmetic mean.
- [`itercumeanabs( iterator )`][@stdlib/stats/iter/cumeanabs]: create an iterator which iteratively computes a cumulative arithmetic mean of absolute values.
- [`itercumeanabs2( iterator )`][@stdlib/stats/iter/cumeanabs2]: create an iterator which iteratively computes a cumulative arithmetic mean of squared absolute values.
- [`itercumidrange( iterator )`][@stdlib/stats/iter/cumidrange]: create an iterator which iteratively computes a cumulative mid-range.
- [`itercumin( iterator )`][@stdlib/stats/iter/cumin]: create an iterator which iteratively computes a cumulative minimum value.
- [`itercuminabs( iterator )`][@stdlib/stats/iter/cuminabs]: create an iterator which iteratively computes a cumulative minimum absolute value.
- [`itercuprod( iterator )`][@stdlib/stats/iter/cuprod]: create an iterator which iteratively computes a cumulative product.
- [`itercurange( iterator )`][@stdlib/stats/iter/curange]: create an iterator which iteratively computes a cumulative range.
- [`itercusum( iterator )`][@stdlib/stats/iter/cusum]: create an iterator which iteratively computes a cumulative sum.
- [`itercusumabs( iterator )`][@stdlib/stats/iter/cusumabs]: create an iterator which iteratively computes a cumulative sum of absolute values.
- [`itercusumabs2( iterator )`][@stdlib/stats/iter/cusumabs2]: create an iterator which iteratively computes a cumulative sum of squared absolute values.
- [`itermax( iterator )`][@stdlib/stats/iter/max]: compute the maximum value of all iterated values.
- [`itermaxabs( iterator )`][@stdlib/stats/iter/maxabs]: compute the maximum absolute value of all iterated values.
- [`itermean( iterator )`][@stdlib/stats/iter/mean]: compute the arithmetic mean over all iterated values.
- [`itermeanabs( iterator )`][@stdlib/stats/iter/meanabs]: compute the arithmetic mean of absolute values for all iterated values.
- [`itermeanabs2( iterator )`][@stdlib/stats/iter/meanabs2]: compute the arithmetic mean of squared absolute values for all iterated values.
- [`itermidrange( iterator )`][@stdlib/stats/iter/midrange]: compute the mid-range of all iterated values.
- [`itermin( iterator )`][@stdlib/stats/iter/min]: compute the minimum value of all iterated values.
- [`iterminabs( iterator )`][@stdlib/stats/iter/minabs]: compute the minimum absolute value of all iterated values.
- [`itermmax( iterator, W )`][@stdlib/stats/iter/mmax]: create an iterator which iteratively computes a moving maximum value.
- [`itermmaxabs( iterator, W )`][@stdlib/stats/iter/mmaxabs]: create an iterator which iteratively computes a moving maximum absolute value.
- [`itermmean( iterator, W )`][@stdlib/stats/iter/mmean]: create an iterator which iteratively computes a moving arithmetic mean.
- [`itermmeanabs( iterator, W )`][@stdlib/stats/iter/mmeanabs]: create an iterator which iteratively computes a moving arithmetic mean of absolute values.
- [`itermmeanabs2( iterator, W )`][@stdlib/stats/iter/mmeanabs2]: create an iterator which iteratively computes a moving arithmetic mean of squared absolute values.
- [`itermmidrange( iterator, W )`][@stdlib/stats/iter/mmidrange]: create an iterator which iteratively computes a moving mid-range.
- [`itermmin( iterator, W )`][@stdlib/stats/iter/mmin]: create an iterator which iteratively computes a moving minimum value.
- [`itermminabs( iterator, W )`][@stdlib/stats/iter/mminabs]: create an iterator which iteratively computes a moving minimum absolute value.
- [`itermprod( iterator, W )`][@stdlib/stats/iter/mprod]: create an iterator which iteratively computes a moving product.
- [`itermrange( iterator, W )`][@stdlib/stats/iter/mrange]: create an iterator which iteratively computes a moving range.
- [`itermsum( iterator, W )`][@stdlib/stats/iter/msum]: create an iterator which iteratively computes a moving sum.
- [`itermsumabs( iterator, W )`][@stdlib/stats/iter/msumabs]: create an iterator which iteratively computes a moving sum of absolute values.
- [`itermsumabs2( iterator, W )`][@stdlib/stats/iter/msumabs2]: create an iterator which iteratively computes a moving sum of squared absolute values.
- [`iterprod( iterator )`][@stdlib/stats/iter/prod]: compute the product of all iterated values.
- [`iterrange( iterator )`][@stdlib/stats/iter/range]: compute the range of all iterated values.
- [`iterstdev( iterator[, mean] )`][@stdlib/stats/iter/stdev]: compute the corrected sample standard deviation over all iterated values.
- [`itersum( iterator )`][@stdlib/stats/iter/sum]: compute the sum of all iterated values.
- [`itersumabs( iterator )`][@stdlib/stats/iter/sumabs]: compute the sum of absolute values for all iterated values.
- [`itersumabs2( iterator )`][@stdlib/stats/iter/sumabs2]: compute the sum of squared absolute values for all iterated values.
- [`itervariance( iterator[, mean] )`][@stdlib/stats/iter/variance]: compute the unbiased sample variance over all iterated values.

## Examples

```javascript
var getKeys = require( '@stdlib/utils-keys' );
var ns = require( '@stdlib/stats-iter' );

console.log( getKeys( ns ) );
```

* * *

## Notice

This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.

For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib].

#### Community

[![Chat][chat-image]][chat-url]

---

## License

See [LICENSE][stdlib-license].

## Copyright

Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].

[npm-image]: http://img.shields.io/npm/v/@stdlib/stats-iter.svg
[npm-url]: https://npmjs.org/package/@stdlib/stats-iter

[test-image]: https://github.com/stdlib-js/stats-iter/actions/workflows/test.yml/badge.svg?branch=main
[test-url]: https://github.com/stdlib-js/stats-iter/actions/workflows/test.yml?query=branch:main

[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/stats-iter/main.svg
[coverage-url]: https://codecov.io/github/stdlib-js/stats-iter?branch=main

[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
[chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im

[stdlib]: https://github.com/stdlib-js/stdlib

[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors

[umd]: https://github.com/umdjs/umd
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules

[deno-url]: https://github.com/stdlib-js/stats-iter/tree/deno
[deno-readme]: https://github.com/stdlib-js/stats-iter/blob/deno/README.md
[umd-url]: https://github.com/stdlib-js/stats-iter/tree/umd
[umd-readme]: https://github.com/stdlib-js/stats-iter/blob/umd/README.md
[esm-url]: https://github.com/stdlib-js/stats-iter/tree/esm
[esm-readme]: https://github.com/stdlib-js/stats-iter/blob/esm/README.md
[branches-url]: https://github.com/stdlib-js/stats-iter/blob/main/branches.md

[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/stats-iter/main/LICENSE

[@stdlib/stats/iter/cugmean]: https://github.com/stdlib-js/stats-iter-cugmean

[@stdlib/stats/iter/cuhmean]: https://github.com/stdlib-js/stats-iter-cuhmean

[@stdlib/stats/iter/cumax]: https://github.com/stdlib-js/stats-iter-cumax

[@stdlib/stats/iter/cumaxabs]: https://github.com/stdlib-js/stats-iter-cumaxabs

[@stdlib/stats/iter/cumean]: https://github.com/stdlib-js/stats-iter-cumean

[@stdlib/stats/iter/cumeanabs]: https://github.com/stdlib-js/stats-iter-cumeanabs

[@stdlib/stats/iter/cumeanabs2]: https://github.com/stdlib-js/stats-iter-cumeanabs2

[@stdlib/stats/iter/cumidrange]: https://github.com/stdlib-js/stats-iter-cumidrange

[@stdlib/stats/iter/cumin]: https://github.com/stdlib-js/stats-iter-cumin

[@stdlib/stats/iter/cuminabs]: https://github.com/stdlib-js/stats-iter-cuminabs

[@stdlib/stats/iter/cuprod]: https://github.com/stdlib-js/stats-iter-cuprod

[@stdlib/stats/iter/curange]: https://github.com/stdlib-js/stats-iter-curange

[@stdlib/stats/iter/cusum]: https://github.com/stdlib-js/stats-iter-cusum

[@stdlib/stats/iter/cusumabs]: https://github.com/stdlib-js/stats-iter-cusumabs

[@stdlib/stats/iter/cusumabs2]: https://github.com/stdlib-js/stats-iter-cusumabs2

[@stdlib/stats/iter/max]: https://github.com/stdlib-js/stats-iter-max

[@stdlib/stats/iter/maxabs]: https://github.com/stdlib-js/stats-iter-maxabs

[@stdlib/stats/iter/mean]: https://github.com/stdlib-js/stats-iter-mean

[@stdlib/stats/iter/meanabs]: https://github.com/stdlib-js/stats-iter-meanabs

[@stdlib/stats/iter/meanabs2]: https://github.com/stdlib-js/stats-iter-meanabs2

[@stdlib/stats/iter/midrange]: https://github.com/stdlib-js/stats-iter-midrange

[@stdlib/stats/iter/min]: https://github.com/stdlib-js/stats-iter-min

[@stdlib/stats/iter/minabs]: https://github.com/stdlib-js/stats-iter-minabs

[@stdlib/stats/iter/mmax]: https://github.com/stdlib-js/stats-iter-mmax

[@stdlib/stats/iter/mmaxabs]: https://github.com/stdlib-js/stats-iter-mmaxabs

[@stdlib/stats/iter/mmean]: https://github.com/stdlib-js/stats-iter-mmean

[@stdlib/stats/iter/mmeanabs]: https://github.com/stdlib-js/stats-iter-mmeanabs

[@stdlib/stats/iter/mmeanabs2]: https://github.com/stdlib-js/stats-iter-mmeanabs2

[@stdlib/stats/iter/mmidrange]: https://github.com/stdlib-js/stats-iter-mmidrange

[@stdlib/stats/iter/mmin]: https://github.com/stdlib-js/stats-iter-mmin

[@stdlib/stats/iter/mminabs]: https://github.com/stdlib-js/stats-iter-mminabs

[@stdlib/stats/iter/mprod]: https://github.com/stdlib-js/stats-iter-mprod

[@stdlib/stats/iter/mrange]: https://github.com/stdlib-js/stats-iter-mrange

[@stdlib/stats/iter/msum]: https://github.com/stdlib-js/stats-iter-msum

[@stdlib/stats/iter/msumabs]: https://github.com/stdlib-js/stats-iter-msumabs

[@stdlib/stats/iter/msumabs2]: https://github.com/stdlib-js/stats-iter-msumabs2

[@stdlib/stats/iter/prod]: https://github.com/stdlib-js/stats-iter-prod

[@stdlib/stats/iter/range]: https://github.com/stdlib-js/stats-iter-range

[@stdlib/stats/iter/stdev]: https://github.com/stdlib-js/stats-iter-stdev

[@stdlib/stats/iter/sum]: https://github.com/stdlib-js/stats-iter-sum

[@stdlib/stats/iter/sumabs]: https://github.com/stdlib-js/stats-iter-sumabs

[@stdlib/stats/iter/sumabs2]: https://github.com/stdlib-js/stats-iter-sumabs2

[@stdlib/stats/iter/variance]: https://github.com/stdlib-js/stats-iter-variance