Metadata-Version: 2.1
Name: ml4xcube
Version: 0.0.5
Summary: ML package for data cubes
Author-email: Julia Peters <julia.peters@informatik.uni-leipzig.de>
License: MIT License
        
        Copyright (c) 2022 by ScaDS.AI, the xcube development team and contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Keywords: machine learning,tools,data cube utilities
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: bokeh>=2.4.3
Requires-Dist: dask>=2023.2.0
Requires-Dist: jinja2==3.1.3
Requires-Dist: mypy_extensions==1.0.0
Requires-Dist: numpy>=1.24
Requires-Dist: pandas>=2.2
Requires-Dist: scikit-learn>1.3.1
Requires-Dist: xarray>2023.8.0
Requires-Dist: zarr>2.11
Requires-Dist: rechunker>=0.5.1
Requires-Dist: sentinelhub

# 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:
```bash
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:

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

You can then call the functions directly:

```python
# 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](https://github.com/deepesdl/ML-Toolkits/blob/master/LICENSE) file for more details.
