OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Linear Tree

Linear Tree is a Python machine-learning library that builds decision trees with linear models in their leaves and also provides LinearForest and LinearBoost estimators.

Independent OpenViST project profile, based on linked sources.

Linear Tree — Model-tree regression and classification
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Choose it when you want tree-based decision rules while retaining linear models in leaves, or want the library’s forest and boosting variants for residual modeling.

Who it is for

  • Python practitioners building regression or classification models with scikit-learn.
  • Machine-learning developers who want tree-based splits with linear predictions in terminal nodes.

Documented uses

  • Fit a regression or classification model tree using a selected scikit-learn linear estimator.
  • Model residuals with a random forest after fitting a linear model through LinearForest.
  • Use LinearBoost in a pipeline, including for automated feature engineering.
Before you choose

Requirements & limits

The project is distributed as a Python library installable with pip and is licensed under MIT.

  • Requires NumPy, SciPy and scikit-learn 0.24.2 or later.
  • The README states support for Python 3.6 or above.
  • LinearTree fits linear estimators in tree nodes; LinearForest models residuals with a random forest, while LinearBoost uses a two-stage residual-based process.

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

Install linear-tree

Install the library and its documented Python dependencies.

Before you start

  • Python 3.6 or above
  • NumPy, SciPy, and scikit-learn version 0.24.2 or later

Steps

  1. Install or upgrade the package with the command below.

    Documented command
    pip install --upgrade linear-tree
  2. Use it in a Python environment that meets the documented Python and dependency requirements.

Expected outcome

The linear-tree package is installed for use with scikit-learn estimators.

Guide limitations

  • The installation instructions do not document environment setup or troubleshooting.
Source-based practical guide

Fit a linear tree regressor

Create synthetic regression data and fit a LinearTreeRegressor with LinearRegression as its base estimator.

Before you start

  • linear-tree installed
  • scikit-learn installed

Steps

  1. Import LinearRegression, LinearTreeRegressor, and make_regression.

  2. Create data with make_regression(n_samples=100, n_features=4, n_informative=2, n_targets=1, random_state=0, shuffle=False), assigning the outputs to X and y.

  3. Create LinearTreeRegressor(base_estimator=LinearRegression()).

  4. Fit the estimator with regr.fit(X, y).

Expected outcome

A linear tree regressor is fitted to the generated data.

Guide limitations

  • The documented example demonstrates fitting only; it does not show prediction, evaluation, or model persistence.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
16 November 2026
Original website title
cerlymarco/linear-tree · Official homepage title · retained in its source language