{"id":27671,"library":"ctboost","title":"CTBoost","description":"CTBoost is a GPU-accelerated gradient boosting library that uses Conditional Inference Trees (CIT) as base learners, providing a statistically principled alternative to standard regression trees. Current version is 0.1.50, with frequent releases.","status":"active","version":"0.1.50","language":"python","source_language":"en","source_url":"https://github.com/captnmarkus/ctboost","tags":["gradient-boosting","conditional-inference-trees","gpu-acceleration","machine-learning","classification","regression"],"install":[{"cmd":"pip install ctboost","lang":"bash","label":"Standard install"},{"cmd":"pip install ctboost[cuda]","lang":"bash","label":"With CUDA support"}],"dependencies":[{"reason":"Core dependency for array operations","package":"numpy","optional":false},{"reason":"Required for DataFrame input handling","package":"pandas","optional":false},{"reason":"Used for statistical computations in CIT","package":"scipy","optional":false},{"reason":"JIT compilation for GPU acceleration","package":"numba","optional":true},{"reason":"GPU arrays support when using CUDA backend","package":"cupy","optional":true}],"imports":[{"note":"Correct import for classification model","wrong":"","symbol":"CTBoostClassifier","correct":"from ctboost import CTBoostClassifier"},{"note":"Correct import for regression model","wrong":"","symbol":"CTBoostRegressor","correct":"from ctboost import CTBoostRegressor"}],"quickstart":{"code":"from sklearn.datasets import make_classification\nfrom sklearn.model_selection import train_test_split\nfrom ctboost import CTBoostClassifier\n\nX, y = make_classification(n_samples=1000, n_features=20, random_state=42)\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n\nmodel = CTBoostClassifier(n_estimators=100, learning_rate=0.1, use_gpu=False)\nmodel.fit(X_train, y_train)\nprint(f\"Accuracy: {model.score(X_test, y_test):.3f}\")","lang":"python","description":"Quickstart example with CTBoostClassifier on synthetic data, CPU mode."},"warnings":[{"fix":"Replace `verbose=True` with `verbosity=1` or higher.","message":"The parameter `verbose` was renamed to `verbosity` in version 0.1.40. Using `verbose` raises a deprecation warning and will be removed in the future.","severity":"deprecated","affected_versions":">=0.1.40, <0.1.46"},{"fix":"Explicitly set `use_gpu=False` if CPU execution is required.","message":"In version 0.1.35, the default value of `use_gpu` changed from `False` to `None`. `None` means auto-detect GPU. Code that relied on `use_gpu=False` being default may now unexpectedly attempt GPU usage on machines with NVIDIA GPUs.","severity":"breaking","affected_versions":">=0.1.35"},{"fix":"Use `sklearn.impute.SimpleImputer` or a similar imputation strategy.","message":"CTBoost currently does not support missing values (NaN). Passing a DataFrame with NaN will raise an error. Pre-impute missing values before fitting.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Ensure you are using `from ctboost import CTBoostClassifier`. In versions <0.1.0, the class was named `CTBClassifier`. Upgrade to latest: pip install --upgrade ctboost","cause":"Attempting to import from a wrong path or an older version where the class had a different name.","error":"ImportError: cannot import name 'CTBoostClassifier' from 'ctboost'"},{"fix":"Clean your data: drop or impute NaN and infinity values before calling .fit().","cause":"CTBoost does not handle missing or infinite values.","error":"ValueError: Input contains NaN, infinity or a value too large for dtype('float64')."},{"fix":"Install CuPy via `pip install cupy-cuda12x` (matching your CUDA version) or set `use_gpu=False` explicitly.","cause":"The `use_gpu` parameter was set to True (or default auto-detection) but no CUDA-enabled GPU or CuPy is installed.","error":"RuntimeError: CUDA is not available. Please install CuPy or set use_gpu=False."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}