Metadata-Version: 2.4
Name: seraplot
Version: 2.5.3
Summary: Rust data visualization framework - The modern Plotly alternative
Author: feur25
License: MIT
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Source Code, https://github.com/feur25/seraplot-telemetry

﻿# SeraPlot - High-Performance Visualization & Production-Ready ML

**SeraPlot** is a Rust-native framework that bundles **60+ interactive chart types** and a **complete machine-learning toolkit** in a single binary - no Plotly, no Matplotlib, no scikit-learn dependency. Build dashboards, train models, ship to production, all from one library.

📖 **Full documentation:** https://feur25.github.io/seraplot/introduction.html

📦 **PyPI:** `pip install seraplot` &middot;

---

## Why SeraPlot

- **100x to 8000x faster** than Plotly + Matplotlib on chart generation - measured, reproducible.
- **Zero Python dependencies for plots** - every renderer ships as compiled Rust, ready for serverless, edge devices and embedded systems.
- **Plots + ML in one package** - no need to glue 5 libraries together. Visualize, preprocess, train, evaluate from a single `import seraplot as sp`.
- **Production-grade** - online learning (Welford `partial_fit`), incremental encoders, deterministic outputs, zero hidden global state.
- **Multi-target** - Python (PyPI), JavaScript / WebAssembly (npm), C / C++ FFI, C# bindings.
- **Self-contained HTML output** - every chart is a single inlined HTML file. Drop into a slide, an email, a notebook, a dashboard - it just works.

---

## Gallery - Chart Types

### 2D Charts
| | | | |
|:---:|:---:|:---:|:---:|
| ![2D-1](https://raw.githubusercontent.com/feur25/seraplot-documentation/main/2d/1.png) | ![2D-2](https://raw.githubusercontent.com/feur25/seraplot-documentation/main/2d/2.png) | ![2D-3](https://raw.githubusercontent.com/feur25/seraplot-documentation/main/2d/3.png) | ![2D-4](https://raw.githubusercontent.com/feur25/seraplot-documentation/main/2d/4.png) |
| ![2D-5](https://raw.githubusercontent.com/feur25/seraplot-documentation/main/2d/5.png) | ![2D-6](https://raw.githubusercontent.com/feur25/seraplot-documentation/main/2d/6.png) | ![2D-7](https://raw.githubusercontent.com/feur25/seraplot-documentation/main/2d/7.png) | ![2D-8](https://raw.githubusercontent.com/feur25/seraplot-documentation/main/2d/8.png) |

### 3D Charts
| | | | |
|:---:|:---:|:---:|:---:|
| ![3D-1](https://raw.githubusercontent.com/feur25/seraplot-documentation/main/3d/1.png) | ![3D-2](https://raw.githubusercontent.com/feur25/seraplot-documentation/main/3d/2.png) | ![3D-3](https://raw.githubusercontent.com/feur25/seraplot-documentation/main/3d/3.png) | ![3D-4](https://raw.githubusercontent.com/feur25/seraplot-documentation/main/3d/4.png) |
| ![3D-5](https://raw.githubusercontent.com/feur25/seraplot-documentation/main/3d/5.png) | ![3D-6](https://raw.githubusercontent.com/feur25/seraplot-documentation/main/3d/6.png) | ![3D-7](https://raw.githubusercontent.com/feur25/seraplot-documentation/main/3d/7.png) | ![3D-8](https://raw.githubusercontent.com/feur25/seraplot-documentation/main/3d/8.png) |

---

## Machine Learning - Production Toolkit

A scikit-learn compatible API, written in Rust, with online-learning primitives ready for streaming workloads.

### Supervised Learning
- **Linear models:** Linear / Ridge / Lasso / ElasticNet / Logistic regression with `score`, `predict_proba`, `decision_function`.
- **Trees & ensembles:** Decision Tree (classifier + regressor), Random Forest, Gradient Boosting.
- **Neighbors:** KNN classifier + regressor.
- **Naive Bayes, SVM, MLP** - full estimator interface.

### Unsupervised Learning
- **Clustering:** KMeans, DBSCAN, Agglomerative, Mean-Shift.
- **Dimensionality reduction:** PCA, t-SNE, UMAP.

### Preprocessing & Pipelines
- **Online scalers:** `StandardScaler` with Welford `partial_fit` for streaming data - no full pass required.
- **Incremental encoders:** `OneHotEncoder` and `OrdinalEncoder` with category union across batches.
- **Pipelines:** Chain transformers + estimator with full `score` / `predict_proba` / `decision_function` propagation.
- **Train/test split, cross-validation, grid search**.

### Metrics
Accuracy, precision, recall, F1, ROC-AUC, log-loss, R-squared, MAE, MSE, RMSE, confusion matrix, classification report - identical signatures to scikit-learn.

---

## Installation

```bash
pip install seraplot
```

Conda / uv users:

```bash
conda install -c conda-forge seraplot
uv pip install seraplot
```

JavaScript / WebAssembly:

```bash
npm install seraplot
```

---

## Performance

SeraPlot consistently delivers **100x to 8000x speedups** over Plotly and Matplotlib on chart generation, with a flat memory profile that fits inside containers, lambdas and embedded targets. ML estimators are within ~5% of scikit-learn while supporting `partial_fit` for streaming workloads that scikit-learn cannot handle natively.

---

- **Documentation:** https://feur25.github.io/seraplot/introduction.html
