Machine learning library — Sera Framework (Rust core). Drop-in Scikit-learn replacement, 2–686× faster.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file seraml-1.0.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: seraml-1.0.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 8.5 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46084b09689041b7a02eefc30ae2ca2d3cee7cbaccac5098db2eaa7d95e52297
|
|
| MD5 |
ee35f94b4fa5a61283134714c7fc0315
|
|
| BLAKE2b-256 |
83d520f89e5a6f6171697859613b37ec4f7b468de2a34b11ca3dde8e2c2f9158
|