Skip to main content

sklplus

中文文档

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

Install

The PyPI / import name is sklplus (the GitHub repo may still be named sklearnplus).

Editable (from a clone):

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.0

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

  • CleanColumnNames
  • DateFeatureExtractor
  • RareCategoryGrouper
  • TargetLabelEncoder

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

Known gaps

Not implemented yet (called P1 in the design notes): GroupFeatures, RemoveMulticollinearity, RemoveOutliers, IterativeImputerPlus, TextEmbedder; Optuna/skopt search wrappers; broader check_estimator coverage; a docs site.

License: TODO (not declared in pyproject.toml yet).

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.0.tar.gz (15.3 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.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sklplus-0.1.0.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for sklplus-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9ccbd682fb0d1173ba481844a2100de4f60f8554f229a10a43c3991d8619a365
MD5 4b43654a8dddb51fb19c60aae3f41694
BLAKE2b-256 bb233d2444e03b25e099fd3e13fe3879a8c8cbcb5a4d292489fdc4177bdcf701

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sklplus-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for sklplus-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4275a8ab883e6731945b313458861c7056db068bd2d0391c44831f272c4c40b8
MD5 2d5e6a8141595bbdc14a6cb01b0225ce
BLAKE2b-256 8484de5579a376b825719958d72e7763c639bd5eee2061066d240df1e0db35b9

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.1

2 files

This release

0.1.0 This release

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