Skip to main content

Machine learning for streamflow prediction

Project description

mlstream

Documentation Status

Machine learning for streamflow prediction.

PyPI: https://pypi.org/project/mlstream/

Documentation: https://mlstream.readthedocs.io/

Usage

This project is work in progress. The idea is to create an easy way of training machine learning streamflow models: Just provide your data, select a model (or provide your own), and get the predictions.

Training

exp = Experiment(data_path, is_train=True, run_dir=run_dir,
                 start_date='01012000', end_date='31122015',
                 basins=train_basin_ids, 
                 forcing_attributes=['precip', 'tmax', 'tmin'],
                 static_attributes=['area', 'regulation'])

exp.set_model(model)
exp.train()

Inference

run_dir = Path('./experiments')
exp = Experiment(data_path, is_train=False, 
                 run_dir=run_dir, 
                 basins=test_basin_ids,
                 start_date='01012016', end_date='31122018')
model.load(run_dir / 'model.pkl')
exp.set_model(model)  
results = exp.predict()

Project details


Download files

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

Files for mlstream, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size mlstream-0.1.2-py3-none-any.whl (28.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size mlstream-0.1.2.tar.gz (20.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page