Skip to main content

sklplus

中文文档

sklplus 0.1.1 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
  • scikit-learn>=1.3
  • Default install also pulls: numpy, pandas, scipy, joblib, xgboost, lightgbm, catboost, imbalanced-learn, pyod, kmodes, category-encoders, feature-engine

Install

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

pip install sklplus

From a clone (editable, with test tools):

pip install -e ".[dev]"

[dev] adds pytest>=7 and ruff.

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

Resampling

Use ImbPipeline when a step calls fit_resample (e.g. SMOTE). Plain Pipeline is the sklearn one.

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
python examples/01_classification_pipeline.py

Custom preprocessors in 0.1.1

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)
  • IterativeImputerPlusIterativeImputer 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; broader check_estimator coverage; a docs site. P1 custom preprocessors / RemoveOutliers sampler are implemented.

License: MIT (see LICENSE).

Contributing: TODO.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sklplus-0.1.1.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sklplus-0.1.1-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

Details for the file sklplus-0.1.1.tar.gz.

File metadata

  • Download URL: sklplus-0.1.1.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sklplus-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1895b0b87eb54c7832e6e0ebca01b2d29ce4213d7d6c697a94894e66774446fb
MD5 d6681c15a866014fd0421df77738649b
BLAKE2b-256 09a84e042e5c829eea0540efc319f9062388ccee5479639c0205f80179ec128e

See more details on using hashes here.

Provenance

The following attestation bundles were made for sklplus-0.1.1.tar.gz:

Publisher: publish-to-pypi.yml on IncubatorShokuhou/sklplus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sklplus-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sklplus-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 25.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sklplus-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 813b0b4fc110a2a3f538143a04b2bea55692c04c335d9efd12b0b15dfafbe8b0
MD5 4031404137970d1c404a629b966395cd
BLAKE2b-256 274f9b7c90aa57879b2cf945b6bb1d6d78f2197d16a87c642e171a54e184c52f

See more details on using hashes here.

Provenance

The following attestation bundles were made for sklplus-0.1.1-py3-none-any.whl:

Publisher: publish-to-pypi.yml on IncubatorShokuhou/sklplus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

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