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.2.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

lpde-0.0.2-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lpde-0.0.2.tar.gz
Algorithm Hash digest
SHA256 26e7d9de6a11634a8e63058073a70d45938f54681db6c3ebfbb6ce76df6785bf
MD5 cdbe81fcb899145675d698e0403b04b0
BLAKE2b-256 64446bd5a5c6b397370d061a27d592a134d56ab1381fec01cc883929762736a4

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for lpde-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dd297f158ba2230e1fe6492def2942ec7fa95aef943a4ece1424f17dffba0db4
MD5 bd07e6fc88f69605d6e241c32693cf67
BLAKE2b-256 b1d32c0abe2755396c0d5e67319c7354ab70e60616f105ad0c6eef5b2ad8d038

See more details on using hashes here.

Supported by

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