MRTSBoosting: Multivariate Robust Time Series Boosting
Project description
MRTSBoosting: Multivariate Robust Time Series Boosting
MRTS-Boosting is a fast and robust time series classification (TSC) framework designed for noisy and temporally irregular data. It combines full-series and interval-based feature extraction with an XGBoost ensemble classifier, enabling accurate classification under challenging conditions such as cloud contamination and variable planting schedules.
The method is tailored for multisensor satellite data, including optical and radar vegetation indices (VIs), which often differ in acquisition frequency and temporal alignment. By treating each VI as an independent series on its own temporal grid, MRTS-Boosting avoids the need for resampling while fully exploiting complementary information.
Key Features
- Handles multivariate, misaligned, and unequal-length time series (e.g., Sentinel-1 radar and Sentinel-2 optical VIs).
- Quality-aware feature extraction using observation weights (e.g., CloudScore+) to mitigate noise such as cloud contamination.
- Full-series features: weighted slope, dominant period and spectral power (Lomb–Scargle), entropy, and weighted lag-1 autocorrelation.
- Interval-based features: weighted quartiles (Q1, median, Q3), IQR, MAD, and local slope, adaptively selected based on observation quality.
- Scalable and efficient, with parallelized feature extraction using joblib and numba.
- Seamless integration with sktime: direct conversion from nested time series format to the required input dictionary.
- Powered by XGBoost for high-performance, regularized classification.
Installation
Clone the repository and install the dependencies:
git clone https://github.com/byususen/mrtsboosting.git
cd mrtsboosting
pip install -r requirements.txt
Usage Example
import numpy as np
from sklearn.metrics import accuracy_score, cohen_kappa_score
from sktime.datasets import load_UCR_UEA_dataset
#from mrtsboosting import MRTSBoostingClassifier
# 1) Load UCR dataset (univariate, nested DataFrame)
X_train, y_train = load_UCR_UEA_dataset("CBF", split="train", return_X_y=True)
X_test, y_test = load_UCR_UEA_dataset("CBF", split="test", return_X_y=True)
# Ensure class labels are 0-indexed
le = LabelEncoder()
y_train = le.fit_transform(y_train)
y_test = le.transform(y_test)
# 2) Convert nested sktime format -> flat dicts (per your class helper)
model = MRTSBoostingClassifier()
x_train_flat, y_train_dict = model.from_sktime_nested_uni(X_train, y_train, id_prefix='train')
x_test_flat, y_test_dict = model.from_sktime_nested_uni(X_test, y_test, id_prefix='test')
# 3) Group by sample id (what extract_features expects)
x_train = model.preprocess_x_data_dict(x_train_flat)
x_test = model.preprocess_x_data_dict(x_test_flat)
# 4) Fit & predict
model.fit(x_train, y_train_dict)
y_pred = model.predict(x_test)
# 5) Evaluate
acc = accuracy_score(y_test_dict["label"], y_pred)
kappa = cohen_kappa_score(y_test_dict["label"], y_pred)
print(f"[CBF] Accuracy: {acc:.3f} | Cohen’s κ: {kappa:.3f}")
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mrtsboosting-0.1.0.tar.gz.
File metadata
- Download URL: mrtsboosting-0.1.0.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c90bd05cb9dcb1b998c93bf1a94d90f320e6c7f372ac0da819036479552f4568
|
|
| MD5 |
b18cabc67f0862ae9ae369ab3034cf88
|
|
| BLAKE2b-256 |
30b06a41d76f4500a795ca53e9c3fa94f0f52be6c24705b3d69e66f981ddda73
|
File details
Details for the file mrtsboosting-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mrtsboosting-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccb2dd56ba8c4fdb5aa623a766f97207f945f3579841e79119a1c1974dce45ee
|
|
| MD5 |
c17c982c52d5b35eb0b4738276d37fbb
|
|
| BLAKE2b-256 |
7f42d9530eef331c75d41bb891a041f4f5256d512f87acd8613e61842fa16a00
|