Skip to content

A broad collection of online algorithms (a.k.a streaming algorithms) implemented in R.

Notifications You must be signed in to change notification settings

THargreaves/online-oceanarium

Repository files navigation

Online Oceanarium

Language License Code Style

R-CMD-check Documentation Code Quality Code Coverage

Overview

Online Oceanarium Logo

Online Oceanarium is an esoteric R package collecting examples of online algorthms (also known as streaming algorithms).

In short, online algorithms process their input one piece at a time; a desirable property when processing an ammount of data that is too large to store in memory. This is also useful when data is streamed from a sensor or updating data source and you wish to update your algorithms state without running from scratch.

The focus of this package is largely on online algorithms used for:

  • Machine learning (including reinforcement learning)
  • Statistics
  • Data processing

We hope that this package can be used for both the practical application of online algorithms as well as a demonstration of the implementation of such methods for educational purposes.

Package Design

The package is composed of multiple R6 classes, each corresponding to a particular online algorithm. An instance of these classes is called a streamer and has three core public methods: initialize, update, value. Respectively, these are used to create a new streamer with initial values (by calling <class>$new()), update the state of the streamer by providing new data, and return the current value of the algorithm.

For example, a simple streamer for calculating a running mean is below (note CMA stands for cumulative moving average).

library(onlineoceanarium)
mean <- CMA$new(c(1, 2))
mean$value
#> [1] 1.5
mean$update(c(3, 4))
mean$value
#> [1] 2.5

Contributing

Contributions to the package are welcome. Before writing code, we suggest opening an issue detailing the algorithm you wish to implement or selecting an already open issue.

Please ensure that all contributions are documented, have full coverage with unit tests, and follow the style guide set out in .lintr.

About

A broad collection of online algorithms (a.k.a streaming algorithms) implemented in R.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages