Skip to main content

sklplus

中文文档 · 中文项目页 · Wiki

sklplus 0.2.0 is a thin umbrella around scikit-learn-style tabular estimators. Most symbols are re-exports (often the same object as upstream). A few adapters and custom preprocessors fill gaps we care about when building Pipelines by hand.

It is for people who want from sklplus.… import … and standard fit / transform / predict composition. It is not AutoML: there is no get_model, no setup(), and no string-ID model factory.

Fits: classification, regression, clustering, and anomaly detection on tabular data, with preprocess / sampling / selection / search / metrics helpers re-exported under sklearn-like paths.

Does not fit (v0.1): time-series or NLP specialist modules. If you need PyCaret-style experiment sessions, use something else.

Requirements

  • Python >=3.10
  • Default install: scikit-learn>=1.3, numpy, pandas, scipy, joblib
  • Optional extras:
    • [boost]: xgboost, lightgbm, catboost
    • [imblearn]: imbalanced-learn
    • [anomaly]: pyod
    • [extra]: kmodes, category-encoders, feature-engine
    • [all]: union of the above
    • [dev]: pytest>=7, ruff

Install

PyPI / import / GitHub repo name: sklplus (https://github.com/IncubatorShokuhou/sklplus).

pip install sklplus
# with boosting libs
pip install "sklplus[boost]"
# everything formerly bundled by default
pip install "sklplus[all]"

From a clone (editable, with test tools and full extras):

pip install -e ".[dev,all]"

Missing optional packages raise ImportError naming the extra (e.g. pip install "sklplus[boost]").

Minimal usage

from sklplus.linear_model import LogisticRegression, Ridge
from sklplus.ensemble import RandomForestClassifier, XGBClassifier
from sklplus.preprocessing import (
    StandardScaler,
    CleanColumnNames,
    RareCategoryGrouper,
    DateFeatureExtractor,
    TargetLabelEncoder,
)
from sklplus.sampling import SMOTE
from sklplus.anomaly import IForest
from sklplus.pipeline import Pipeline, ImbPipeline
from sklplus.compose import ColumnTransformer

Re-exports aim to be identity with upstream when possible, e.g. sklplus.ensemble.RandomForestClassifier is sklearn.ensemble.RandomForestClassifier.

Boosting import paths

XGBClassifier / LGBMClassifier / CatBoostClassifier (and the regressors) are exported from both sklplus.ensemble and sklplus.xgboost / lightgbm / catboost. They are the same class object:

from sklplus.ensemble import XGBClassifier as A
from sklplus.xgboost import XGBClassifier as B
assert A is B

Task hubs and ensemble technique slices

sklearn-style modules (linear_model, ensemble, xgboost, …) stay put. Two extra hubs re-export the same objects by task:

from sklplus.classification import LogisticRegression, XGBClassifier
from sklplus.regression import Ridge, XGBRegressor
from sklplus.linear_model import LogisticRegression as LM
from sklplus.xgboost import XGBClassifier as XGB
assert LogisticRegression is LM
assert XGBClassifier is XGB

sklplus.ensemble is still the full umbrella. Technique submodules are slices, not moves:

  • sklplus.ensemble.bagging — BaggingClassifier / BaggingRegressor only (RF / ExtraTrees stay on the umbrella)
  • sklplus.ensemble.boosting — AdaBoost, GradientBoosting, XGB, LGBM, CatBoost
  • sklplus.ensemble.stacking — StackingClassifier / StackingRegressor
  • sklplus.ensemble.voting — VotingClassifier / VotingRegressor
from sklplus.ensemble.boosting import XGBClassifier as A
from sklplus.xgboost import XGBClassifier as B
from sklplus.ensemble import XGBClassifier as C
assert A is B is C

There is no top-level sklplus.stacking, and no get_model / factory.

Resampling and pipeline checks

Use ImbPipeline when a step calls fit_resample (e.g. SMOTE, RemoveOutliers).

sklplus.pipeline.Pipeline is a thin subclass of sklearn's Pipeline, so sklplus.pipeline.Pipeline is sklearn.pipeline.Pipeline is False. Construction defaults to check_conflicts=True. make_pipeline builds this wrapper. Disable with check_conflicts=False, or call validate_pipeline_steps(steps, *, kind) directly.

Examples

Scripts under examples/:

Script Content
01_classification_pipeline.py Pipeline + scaler + RF
02_imbalanced_imbpipeline.py ImbPipeline + SMOTE + logistic
03_boosting_dual_path.py Dual-path identity + small XGB fit
04_preprocessing_p0.py P0 custom transformers on a DataFrame
05_anomaly_iforest.py Scaler + IForest
06_pipeline_conflicts.py Pipeline conflict checks: errors and warnings
python examples/01_classification_pipeline.py

Custom preprocessors in 0.1.2

These live in sklplus.preprocessing (alongside re-exported scalers/encoders):

P0

  • CleanColumnNames
  • DateFeatureExtractor
  • RareCategoryGrouper
  • TargetLabelEncoder

P1

  • GroupFeatures — row-wise aggregates over named column groups
  • RemoveMulticollinearity — drop highly correlated numeric features (optional prefer-by-y)
  • IterativeImputerPlus — IterativeImputer for numeric + most-frequent for categoricals
  • TextEmbedder — BoW / TF-IDF on text columns, concatenated back

Sampling (not preprocessing): RemoveOutliers in sklplus.sampling is an imblearn-style sampler (fit_resample) for train-only outlier row drops — use with ImbPipeline.

Anomaly detectors under sklplus.anomaly are thin wrappers around pyod (IForest, LOF, …) so they can sit in a sklearn Pipeline.

Known gaps

Still open: Optuna/skopt search wrappers. Custom preprocessors pass sklearn.base.clone and check_estimator with DataFrame-only tags (two_d_array=False, so ndarray suites are skipped by design); TargetLabelEncoder / RemoveOutliers / anomaly adapters have clone smoke. P1 preprocessors / RemoveOutliers, pipeline conflict checks, and classification/regression hubs are in. Optional heavy deps are extras since 0.2.0.

License: MIT (see LICENSE).

Contributing: see CONTRIBUTING.md.

Metadata

Release files for sklplus 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sklplus 0.2.0
File Size Uploaded Provenance Actions
sklplus-0.2.0.tar.gz 43.6 kB With provenance Details for sklplus-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sklplus 0.2.0
File Interpreter ABI Platform Actions
sklplus-0.2.0-py3-none-any.whl Python 3 none any Details for sklplus-0.2.0-py3-none-any.whl

Total release size: 82.4 kB

Release files / sklplus-0.2.0.tar.gz

Download URL sklplus-0.2.0.tar.gz
Size 43.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b541bb5eee2763e9989d5a7ff3012337db31610761a4e7d53503e16592ac1293
BLAKE2b-256 checksum
How to use checksums
5cac519b536ce9ca375859caaf965043611e86a515763a338dcb5f99a2ffa6ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / sklplus-0.2.0-py3-none-any.whl

Download URL sklplus-0.2.0-py3-none-any.whl
Size 38.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b8f5be365a9737ab7cd07747995beaa2b0b318ab24a5702e4203f9c1419bad0
BLAKE2b-256 checksum
How to use checksums
aed51766eb1908af7dbaf803b2a9752a1adf8d6ef62a165acca0e8853fe8770c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Security for sklplus 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sklplus-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page