Skip to content

Installation

Requirements

  • Python 3.8+
  • pip or conda

Dependencies

The project requires the following main packages:

Package Purpose
scikit-learn Base ML models, preprocessing
xgboost Gradient boosting models
lightgbm Light gradient boosting
catboost Categorical boosting
PyTorch Neural network models
PyWavelets Wavelet decomposition
scipy Statistical functions
pandas Data manipulation
numpy Numerical operations

Installation Steps

1. Clone the Repository

git clone https://github.com/waddadaa/structural_break_detection.git
cd structural_break_detection
python -m venv venv
source venv/bin/activate  # Linux/Mac
# or
venv\Scripts\activate  # Windows
conda create -n structural_break python=3.10
conda activate structural_break

3. Install Dependencies

pip install -r requirements.txt

4. Verify Installation

python -c "import xgboost; import torch; import pywt; print('All dependencies installed!')"

Optional: GPU Support

For faster training of neural network models:

pip install torch --index-url https://download.pytorch.org/whl/cu118
pip install torch --index-url https://download.pytorch.org/whl/rocm5.4.2

Troubleshooting

CatBoost Compatibility

If you encounter issues with CatBoost on sklearn 1.6+, the meta_stacking_7models detector automatically falls back to ExtraTrees.

Memory Requirements

Some models (especially meta_stacking_7models) require significant memory. Ensure at least 8GB RAM available.