Skip to main content

Learning Partial Differential Equations

Project description

Learning Partial Differential Equations

INSTALLATION

By way of pip:

pip install lpde

By way of source

git clone https://github.com/fkemeth/lpde
cd lpde
pip install .

USAGE

This python package contains functions to learn partial differential equations (PDE) from data.

  • The main components consists of a neural network PDE class Network(torch.nn.Module). To create an instance of this class, one needs to pass a config dictionary that specifies

    • kernel_size: The width of the finite difference stencil used to calculate input spatial derivatives
    • n_derivs: The number of derivatives used in the PDE model
    • device: Either 'cpu' or 'cuda
    • use_param: Boolean that specifies
    • num_params: If use_param is True, then here the number of parameters that change have to be specified.
    • n_filters: The number of neurons in each layer of the PDE model.
    • n_layers: The number of layers of the PDE model.

    In addition, the number of system variables n_var has to be provided

  • Furthermore, a model wrapper to train and evaluate the neural network PDE is provided as a Model class. To create an instance of this class, one needs to provide

    • dataloader_train: A pytorch dataloader with the training data
    • dataloader_val: A pytorch dataloader with the validation data
    • network: A Network instance, as described above
    • config: A config dictionary containing
      • lr: The initial learning rate
      • patience: The patience used for the learning rate scheduler
      • reduce_factor: - The factor by which the learning rate is reduced when loss does not decrease
      • weight_decay: - Weight decay factor for regularization
    • path: String to the directory where the trained model shall be saved

See this GitHub repository for example usages.

ISSUES

For questions, please contact (felix@kemeth.de), or visit the GitHub repository.

LICENCE

This work is licenced under MIT License. Please cite

"Learning emergent partial differential equations in a learned emergent space" F.P. Kemeth et al. (https://arxiv.org/abs/2012.12738)

if you use this package for publications.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lpde-0.0.4.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lpde-0.0.4-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file lpde-0.0.4.tar.gz.

File metadata

  • Download URL: lpde-0.0.4.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.6

File hashes

Hashes for lpde-0.0.4.tar.gz
Algorithm Hash digest
SHA256 6c972e9af4ffb38643761250f345284502bc792ba7007fe5c5155f28bdfad766
MD5 e9a4b330c7c810831aa2f1465515b678
BLAKE2b-256 aace3e2fe4aac3d7e4a14ad73c57d616767cf5c72e83002b096db927d5e50bb6

See more details on using hashes here.

File details

Details for the file lpde-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: lpde-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.6

File hashes

Hashes for lpde-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e9aad443ee5154ba6676ce04f0041c5edd07f1f3c5dae0a4f3dff88c8feb39cc
MD5 bfcac56b944e4499c0e58f35fb3c47a8
BLAKE2b-256 6f5a43e76eb739031badee48276fde789b4041d5e981b83404bab3a6d481a54c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page