Skip to main content

SeraML

Machine learning library built on the Sera Framework — a low-level Rust core shared with SeraPlot and the upcoming SeraDFrame.

SeraML is a drop-in replacement for Scikit-learn, 2–686× faster, with a single pip install and zero C/Fortran dependencies.

pip install seraml

Quick example

from seraml.linear_model import LinearRegression
from seraml.model_selection import train_test_split
from seraml.metrics import r2_score

X = [[1], [2], [3], [4], [5]]
y = [2.1, 4.0, 5.9, 8.1, 10.0]

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)

model = LinearRegression()
model.fit(X_train, y_train)
score = r2_score(y_test, model.predict(X_test))
print(f"R² = {score:.4f}")

Scikit-learn compatibility

SeraML mirrors the Scikit-learn API — .fit(), .predict(), .transform(), .score(). Pipelines work the same way.

Submodules

Module Contents
seraml.linear_model LinearRegression, Ridge, Lasso, ElasticNet, LogisticRegression, SGDClassifier, SGDRegressor, RidgeClassifier
seraml.tree DecisionTreeClassifier, DecisionTreeRegressor
seraml.ensemble RandomForestClassifier, RandomForestRegressor, GradientBoostingClassifier, GradientBoostingRegressor, AdaBoostClassifier, AdaBoostRegressor
seraml.cluster KMeans, DBSCAN
seraml.neighbors KNeighborsClassifier, KNeighborsRegressor, NearestCentroid
seraml.naive_bayes GaussianNB, MultinomialNB, BernoulliNB
seraml.svm LinearSVC, LinearSVR
seraml.preprocessing StandardScaler, MinMaxScaler, RobustScaler, MaxAbsScaler, Normalizer, LabelEncoder, OneHotEncoder, OrdinalEncoder, SimpleImputer, PolynomialFeatures, KBinsDiscretizer, PowerTransformer, QuantileTransformer
seraml.decomposition PCA, TruncatedSVD
seraml.model_selection GridSearchCV, RandomizedSearchCV, HalvingGridSearchCV, HalvingRandomSearchCV, StratifiedKFold, train_test_split, cross_val_score
seraml.metrics Full classification, regression, clustering metric suite

The Sera Framework

SeraML is one of three products built on Sera — a low-level Rust framework:

  • SeraPlot — 60+ chart types, zero dependencies (pypi.org/project/seraplot)
  • SeraML — drop-in Scikit-learn replacement (this package)
  • SeraDFrame — Pandas/Polars alternative (Q4 2027)

The Rust core provides CPU/GPU optimisation, memory arenas, parallel threads (rayon), and a compile-time macro registry — natively inherited by every method.

License

MIT

Metadata

Release files for seraml 1.0.0

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

Built distribution (wheel)

Table of built distributions (wheels) for seraml 1.0.0
File Interpreter ABI Platform
seraml-1.0.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details

Release files / seraml-1.0.0-cp311-cp311-win_amd64.whl

Download URL seraml-1.0.0-cp311-cp311-win_amd64.whl
Size 8.5 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
46084b09689041b7a02eefc30ae2ca2d3cee7cbaccac5098db2eaa7d95e52297
BLAKE2b-256 checksum
How to use checksums
83d520f89e5a6f6171697859613b37ec4f7b468de2a34b11ca3dde8e2c2f9158
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Security for seraml 1.0.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file No provenance

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