OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

Vecstack

Vecstack is a Python package for stacking, or stacked generalization, in machine-learning workflows. It computes out-of-fold features and predictions from first-level estimators for use by a second-level model, through either a functional API or a scikit-learn-compatible transformer.

Independent OpenViST project profile, based on linked sources.

Vecstack — OpenViST project profile in AI Developer Tools & SDKs.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Vecstack when a training workflow has first-level estimators whose outputs should become features for a second-level model.

Who it is for

  • Python machine-learning developers combining outputs from multiple estimators.
  • Scikit-learn users who want stacking inside a transformer or pipeline workflow.

Documented uses

  • Generate stacked features for classification or regression.
  • Produce class-label or probability predictions for classification.
  • Add multilevel stacking to a scikit-learn pipeline.
  • Save stacked features and run hyperparameters to files through the functional API.
Before you choose

Requirements & limits

  • The package documents Python 3.9 or later and dependencies on NumPy, SciPy and scikit-learn 1.6.0 or later.
  • Its two APIs differ in integration style: the functional API returns stacked features directly, while the transformer exposes fit and transform.
  • Classification supports class labels or probabilities, and the package also documents regression.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Add stacked features with the functional API

Generate stacked training and test features from first-level estimators for a regression workflow.

Before you start

  • Python 3.9 or later.
  • NumPy, SciPy and scikit-learn 1.6.0 or later.
  • Training and test inputs, training targets, and initialized sklearn-like estimators.

Steps

  1. Install the package with the command below.

    Documented command
    pip install vecstack
  2. Import stacking from vecstack and prepare a list of first-level estimators.

  3. Call stacking(models, X_train, y_train, X_test, regression=True) to obtain S_train and S_test.

  4. Pass the stacked features to a second-level estimator.

Expected outcome

Stacked training and test features ready for a second-level estimator.

Guide limitations

  • The example assumes the user's data and estimators are already prepared.
  • The README's usage example does not specify a second-level estimator or its training procedure.
Source-based practical guide

Use the scikit-learn transformer API

Create stacked features through Vecstack's `fit` and `transform` interface.

Before you start

  • Python 3.9 or later.
  • NumPy, SciPy and scikit-learn 1.6.0 or later.
  • Training and test inputs, training targets, and named first-level estimators.

Steps

  1. Install the package with the command below.

    Documented command
    pip install vecstack
  2. Import StackingTransformer and initialize it with named estimators and the task setting.

  3. Fit the transformer using X_train and y_train.

  4. Call transform on the training and test inputs to obtain stacked features.

  5. Use those features with a second-level estimator.

Expected outcome

A fitted transformer produces stacked feature arrays and can be incorporated into a scikit-learn pipeline.

Guide limitations

  • The documented example leaves data preparation and the second-level estimator to the user.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
7 November 2026
Original website title
vecxoz/vecstack · Official homepage title · retained in its source language