--- id: aplr version: "10.24.1" license: MIT license_treatment: permissive maintenance: active --- # aplr — Automatic Piecewise Linear Regression License: permissive · Maintenance: active · Downloads: 334.3K/mo ## What it is and what it does APLR is a machine learning library that implements automatic piecewise linear regression, a methodology for building predictive models that split the input space into regions and fit linear models within each. It targets both regression and classification tasks, working with numpy arrays and pandas DataFrames. The core appeal is interpretability: piecewise linear models are easier to understand and explain than black-box methods like neural networks or complex tree ensembles, while the library claims to match or exceed their predictive accuracy in many cases. The package provides a scikit-learn-like API with fit and predict methods, plus a tuning utility for hyperparameter optimization. It requires numpy and pandas as runtime dependencies and supports Python 3.8 and later across Windows, macOS, and Linux. The library is actively maintained, with recent releases and responsive development. Use it for: - Building regression models where interpretability is as important as accuracy, such as in finance or healthcare. - Classification tasks where you need to explain decision boundaries to stakeholders or regulators. - Benchmarking against tree-based methods when you want smoother, more continuous predictions. - Tuning hyperparameters systematically using the provided APLR tuner utility. - Exploratory data analysis where piecewise linear fits reveal structure in relationships between variables. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. APLR builds interpretable regression and classification models using automatic piecewise linear regression, offering smoother predictions than tree-based methods while maintaining competitive accuracy. Yes, if you need interpretable regression or classification models and want an alternative to tree-based or black-box methods. The active maintenance, permissive MIT license, and lack of known vulnerabilities make it a low-risk choice. Medium install friction is typical for compiled packages and should not be a barrier. Start with the published article and examples to assess whether the methodology fits your problem. ## Install pip install aplr uv add aplr poetry add aplr ## Installing aplr Before you install: Medium install friction due to compiled wheels across multiple platforms (Windows, macOS, Linux). Active maintenance with a release 1 day old and last commit on 2026-08-13 suggests responsive development. Depends on numpy and pandas, both widely available. License in practice: MIT license is permissive; you can use, modify, and distribute APLR with minimal restrictions, provided you include the license notice. Quickstart: pip install aplr import pandas as pd from aplr import APLR model = APLR() model.fit(X_train, y_train) predictions = model.predict(X_test) Requires Python 3.8 or later; numpy and pandas must be installed as runtime dependencies. Verify before relying: - Whether APLR's accuracy claims against tree-based methods hold across diverse datasets and problem types. - Performance characteristics and scalability limits for large datasets. - Whether the optional plotting dependencies (aplr[plots]) are necessary for typical workflows. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 334.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags piecewise linear regression, interpretable machine learning models, regression classification python, automatic model fitting, smooth predictive models, linear regression alternative, explainable ml, interpretable-ml, regression-classification, piecewise-linear [View on SkillFed](https://skillfed.io/packages/aplr) · [View on PyPI](https://pypi.org/project/aplr/)