Giter Site home page Giter Site logo

xesn's Introduction

xesn

codecov Documentation Status Conda Version PyPI version

Echo State Networks powered by xarray and dask.

Description

xesn is a python package for implementing Echo State Networks (ESNs), a particular form of Recurrent Neural Network originally introduced by Jaeger (2001). The main purpose of the package is to enable ESNs for relatively large scale weather and climate applications, for example as by Smith et al., (2023) and Arcomano et al., (2020). The package is designed to strike the balance between simplicity and flexibility, with a focus on implementing features that were shown to matter most by Platt et al., (2022).

xesn uses xarray to handle multi-dimensional data, relying on dask for parallelization and to handle datasets/networks that are too large for a single compute node. At its core, xesn uses numpy and cupy for efficient CPU and GPU deployment.

Installation

Installation from conda-forge

conda install -c conda-forge xesn

Installation from pip

pip install xesn

Installation from source

git clone https://github.com/timothyas/xesn.git
cd xesn
pip install -e .

Note that additional dependencies can be installed to run the unit test suite::

pip install -e .[test]
pytest xesn/test/*.py

Getting Started

To learn how to use xesn, check out the documentation here

Get in touch

Report bugs, suggest features, or view the source code on GitHub.

License and Copyright

xesn is licensed under version 3 of the GNU Lesser General Public License.

Development occurs on GitHub at https://github.com/timothyas/xesn.

xesn's People

Contributors

timothyas avatar

Watchers

 avatar

Forkers

tse-chunchen

xesn's Issues

Basic Sanity Check Scaling

Test with SQG dataset:

  • micro_training
  • testing
    • evaluate appending to zarr store, different looping here ... is this ultimately sped up by using GPUs
  • macro_calibration
    • test when .persist, .compute are called in cost
    • test creation of empty dask containers vs appending to lists (in _cost and call)
    • should we call compute in call? or leave it to user?

Bias Sparse check

Should check to make sure is_sparse is not in the kwargs for bias.

Un-Normalize Data

Data are normalized before going into ESN. When making predictions via driver, we need to pop them back.

Dask Handling

Consolidate and possibly generalize the creation of a dask cluster to do the work.

Finalize Documentation and Package Scope

For instance, get rid of ddc references in docs. for example will have to either import a package that has L96, code it up, or store it in a dataset... or something.

add some attributes to test results

when driver.run_test writes out test results, it would be nice to include things like

  • what type of esn created it, and the parameters used to create that esn
  • sample index, maybe, connected to original dataset store
  • ...

Documentation Structure

Create the overall structure

  1. Overview / methods
    a. ESN methods
    b. LazyESN / distributed methods
  2. Example usage of each component
    a. Data preparation
    b. ESN usage with reference to matrix generation
    c. LazyESN usage
    d. Macro training usage
    e. Driver macro_training / training / testing

All done except Macro training example and driver example in #58

Sample indices for macro_training and testing

This should be re-worked to how it was in the original repo, so that the index marks the start of the prediction, not the start of the spinup. That way it's more useful for comparing to other non RNN methods.

Docstrings

Make sure the docstrings are minimal but useful

Chunking

LazyESN (re)chunks the data at the last minute before training and prediction. The input chunks could be different though (e.g., smaller zarr chunks that are mapped to larger working/dask chunks for operation. A test should be added to make sure that this is happening.

input/adjacency/bias factors

it's awkward to separately specify input_factor/adjacency_factor/bias_factor in config... maybe just always specify a dict?

Also, bias -> bias_factor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.