Skip to main content

ML package for data cubes

Project description

ML-Toolkits

The ML Toolkits provide a set of best practice Python-based Jupyter Notebooks that showcase the implementation of the three start-of-the-art Machine Learning libraries (1) scikit-learn, (2) PyTorch and (3) TensorFlow based on the Earth System Data Cube.

Installation

You can install ml4xcube directly via pip:

pip install ml4xcube

Make sure you have Python version 3.8 or higher.

If you're planning to use ml4xcube with TensorFlow or PyTorch, set up these frameworks properly in your Conda environment.

Features

  • Data preprocessing and normalization/standardization functions
  • Gap filling features
  • Dataset creation and train-/ test split sampling techniques
  • Trainer classes for sklearn, TensorFlow and PyTorch
  • Distributed training framework compatible with PyTorch
  • chunk utilities for working with data cubes

Usage

To use ml4xcube in your project, simply import the necessary module:

from ml4xcube.statistics import normalize, standardize
from ml4xcube.training.pytorch import Trainer
# Other imports...

You can then call the functions directly:

# Normalizing data
normalized_data = normalize(your_data, data_min, data_max)

# Trainer instance
trainer = Trainer(
    model           = reg_model,
    train_data      = train_loader,
    test_data       = test_loader,
    optimizer       = optimizer,
    best_model_path = best_model_path,
    early_stopping  = True,
    patience        = 3,
    epochs          = epochs
)

# Start training
reg_model = trainer.train()

License

ml4xcube is released under the MIT License. See the LICENSE file for more details.

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

ml4xcube-0.0.5.tar.gz (781.0 kB view details)

Uploaded Source

Built Distribution

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

ml4xcube-0.0.5-py3-none-any.whl (804.2 kB view details)

Uploaded Python 3

File details

Details for the file ml4xcube-0.0.5.tar.gz.

File metadata

  • Download URL: ml4xcube-0.0.5.tar.gz
  • Upload date:
  • Size: 781.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.5

File hashes

Hashes for ml4xcube-0.0.5.tar.gz
Algorithm Hash digest
SHA256 5629a87459aeb6d3aa4df4689fc1352561a66ebed8aee599836cd7d0f5549ec5
MD5 370b9ae8037a27efb03c3a3b1d5b6cb2
BLAKE2b-256 e682e79d2fe9284877b531fe19c4387ecbc99b26788ae94ec40cc6d645283caf

See more details on using hashes here.

File details

Details for the file ml4xcube-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: ml4xcube-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 804.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.5

File hashes

Hashes for ml4xcube-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 427f2361c93993d27d5f3dc0b981332bf0221d076252fdec46a762ac41a05f05
MD5 85b17c9d71bfd6cbfda5d9140c91d5c5
BLAKE2b-256 9d4247ae7233a31ad2b8bc3e5b375dde12db2bc743b6cdd5fb1f979ef85207e5

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