GPBoost Python Package
Project description
GPBoost Python Package
This is the Python package implementation of the GPBoost library. See https://github.com/fabsig/GPBoost for more information on the modeling background and the software implementation.
Examples
- Detailed Python examples:
- GPBoost algorithm for combining tree-boosting with Gaussian process and random effects models
- GPBoost algorithm for binary classification and other non-Gaussian data (Poisson regression, etc.)
- Parameter tuning using deterministic or random grid search
- Linear Gaussian process and mixed effects model examples
- Generalized linear Gaussian process and mixed effects model examples
- GPBoost algorithm applied to panel data
- GPBoost R and Python demo illustrates how GPBoost can be used in R and Python
- Blog post and corresponding code on how to combine tree-boosting with mixed effects models
Installation
Before you install
setuptools is needed. You can install this using pip install setuptools -U
32-bit Python is not supported. Please install the 64-bit version. See build 32-bit version with 32-bit Python section.
Install from PyPI using pip
In brief, run:
pip install gpboost -U
Below is a more detailed installation guide.
Install using precompiled Python wheel (.whl) file
Install wheel via pip install wheel
first. After that download the wheel file from whlFiles and install from the folder where you downloaded the .whl file using:
pip install gpboost-XXX.whl
Requirements
-
For Windows users, VC runtime is needed if Visual Studio (2015 or newer) is not installed.
-
For Linux users, glibc >= 2.14 is required.
-
For macOS users:
- The library file in distribution wheels is built by the Apple Clang (Xcode version 12.3 from version 0.3.0) compiler. You need to install the OpenMP library. You can install the OpenMP library by the following command:
brew install libomp
.
- The library file in distribution wheels is built by the Apple Clang (Xcode version 12.3 from version 0.3.0) compiler. You need to install the OpenMP library. You can install the OpenMP library by the following command:
Build from source
pip install --no-binary :all: gpboost
Requirements for building from sources
-
Installation from sources requires that you have installed CMake.
-
For macOS users, you can perform installation either with Apple Clang or gcc.
-
In case you prefer Apple Clang, you should install OpenMP (details for installation can be found in the Installation Guide) first and CMake version 3.16 or higher is required.
-
In case you prefer gcc, you need to install it (details for installation can be found in the Installation Guide) and specify compilers by running
export CXX=g++-7 CC=gcc-7
(replace "7" with version of gcc installed on your machine) first.
-
-
For Windows users, Visual Studio (or VS Build Tools) is needed.
Build with MinGW-w64 on Windows
pip install gpboost --install-option=--mingw
CMake and MinGW-w64 should be installed first.
Build 32-bit version with 32-bit Python
pip install gpboost --install-option=--bit32
By default, installation in environment with 32-bit Python is prohibited. However, you can remove this prohibition on your own risk by passing the bit32
option (not recommended).
Install from GitHub
All requirements from the build from source section apply for this installation option as well.
git clone --recursive https://github.com/fabsig/GPBoost.git
cd GPBoost/python-package
# export CXX=g++-7 CC=gcc-7 # macOS users, if you decided to compile with gcc, don't forget to specify compilers (replace "7" with version of gcc installed on your machine)
python setup.py install
Note: sudo
(or administrator rights in Windows) may be needed to perform the command.
If you get any errors during installation or due to any other reasons, you may want to build dynamic library from sources by any method you prefer and then just run python setup.py install --precompile
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for gpboost-0.4.2-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 149d279a418709a74af5a757f213b9bf07cd0034a6cb1a17714bc61657a4abeb |
|
MD5 | 083052c0892719575c5c9df3a9ac8096 |
|
BLAKE2b-256 | d43fd45d80b217fd3f9ed49a7215cf5fa454fa59c1b17819c8188924f369c261 |
Hashes for gpboost-0.4.2-py3-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67259bcde20cfb2faa42e084dcf1dcdb6b3fb8842d2f9ef387d960436fed6786 |
|
MD5 | ef7501b702408ecdbc7b1015b2de1449 |
|
BLAKE2b-256 | cdf9126e3f095f60f422a150242a3e425de9fc8a9072bb368edd5215766916db |
Hashes for gpboost-0.4.2-py3-none-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6d05d2f855ee035689076fd07182da5ee4edf943b7a22a634248ea7def6491a |
|
MD5 | 57dfa78ee333b8a1415483e949765aa8 |
|
BLAKE2b-256 | c3d89c6d7b074d6cc53e0fc47b119ca28ca25e299e1a9aeeb537a1a67552206b |