A Python package for stacking (stacked generalization) with both functional and scikit-learn compatible APIs.
Vecstack is a Python package for implementing stacking (stacked generalization), a machine learning technique that combines multiple models by using their predictions as features for a higher-level model. It solves the problem of improving predictive performance through ensembling while providing both a lightweight functional API and a fully scikit-learn compatible API for flexibility.
Data scientists, machine learning engineers, and Kaggle competitors who need to build robust ensemble models and want efficient, scalable stacking implementations.
Developers choose Vecstack for its dual API approach—offering maximum memory efficiency for competitions and full scikit-learn integration for production pipelines—along with extensive customization options and detailed documentation.
Python package for stacking (machine learning technique)
Offers both a lightweight functional API for memory efficiency and a fully scikit-learn-compatible API, allowing users to switch between Kaggle-ready workflows and production pipelines seamlessly.
The functional API trains and deletes models sequentially, minimizing RAM usage—critical for large datasets in competitions, as emphasized in the README's comparison table.
StackingTransformer works with Pipeline and FeatureUnion, enabling straightforward multilevel stacking and deployment within standardized ecosystems, as shown in the examples.
Supports user-defined metrics, target transformations, and prediction types (e.g., probabilities for classification), providing fine-grained control over ensembling strategies.
Stacking inherently requires significant resources for cross-validation and model training, as admitted in the FAQ, making it impractical for resource-limited or time-sensitive projects.
The scikit-learn API stores all models from each fold, increasing RAM usage, and the transformer design mandates careful data handling to avoid retraining if the train set changes.
Only works with scikit-learn-like estimators, potentially excluding newer or custom frameworks that don't adhere strictly to the fit/predict interface.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.