bottlenose
latest
latest
  • Overview
  • Contributing
    • Contributing
    • Code of Conduct
    • Creating Operators
    • Creating New Modules
    • Improving the Docs
  • Sources & Sinks
    • rxfs (File System)
      • README
      • Getting Started
      • creators
        • fromFile
      • operators
        • writeFile
        • appendFile
    • rxs3 (AWS S3)
      • README
      • Guides
        • Getting Started
      • operators
        • upload
    • rxws (WebSocket)
      • README
      • Guides
        • Quick Start
        • Example: Hello World (Express)
      • operators
        • conduit
        • connections
        • disconnections
        • messages
      • HTTP Requests
  • Data Analysis
    • rxnlp (NLP)
      • README
      • Getting Started
      • operators
        • ngram
        • stem
        • tokenize
    • rxstats (Statistics)
      • README
      • Guides
        • Getting Started
        • Warm Starts
      • operators
        • accuracy
        • change
        • countValues
        • dirtyR
        • dirtyZScore
        • f1
        • mean
        • precision
        • recall
        • roundTo
        • stdev
        • throwUnlessNumber
        • variance
    • rxtranscribe (Speech-to-Text)
      • README
      • operators
        • transcribe
  • Machine Learning
    • rxsgd (SGD)
      • README
      • Guides
        • Getting Started
      • operators
        • classifier
        • predict
Powered by GitBook
On this page
  • Description
  • Examples
  • API
  • Since
  • Parameters
  • Options
  • Returns

Was this helpful?

  1. Data Analysis
  2. rxstats (Statistics)
  3. operators

change

Description

Calculates the differences between each item in an Observable and the prior item.

Examples

import { from } from 'rxjs';
import { change } from '@bottlenose/rxstats';

const num$ = from([2, 5, 9, 16, 26]);
const change$ = num$.pipe(
  change()
);
change$.subscribe(console.log);
// Output:
// 3
// 4
// 7
// 10

API

change()

Since

0.1

Parameters

None

Options

None

Returns

Number. (The latest difference from the Observable)

PreviousaccuracyNextcountValues

Last updated 5 years ago

Was this helpful?