The TypeScript Toolkit for AI & Numerical Computing
Deepbox is a comprehensive, type-safe TypeScript library that unifies numerical computing, tabular data workflows, and machine learning into a single modular package. Zero runtime dependencies. 4,344 tests. Production-ready.Quick Start
Get up and running in 5 minutes with a complete example
Installation
Install Deepbox with npm, yarn, or pnpm
Core Concepts
Learn about tensors, autograd, and broadcasting
API Reference
Explore the complete API documentation
Key Features
N-Dimensional Arrays
N-Dimensional Arrays
90+ operations for arithmetic, trigonometric, logical, reductions, sorting, and manipulation
- Automatic differentiation: GradTensor with reverse-mode backpropagation
- Broadcasting: Full broadcasting semantics for element-wise operations
- Sparse matrices: CSR format with arithmetic and matrix operations
- Multiple dtypes: float32, float64, int32, int64, uint8, bool, string
- Activation functions: ReLU, Sigmoid, Softmax, GELU, Mish, Swish, ELU, LeakyReLU
DataFrames & Series
DataFrames & Series
Tabular API with familiar operations for data manipulation
- Filtering, grouping, joining, merging, pivoting, sorting
- CSV I/O for reading and writing files
- Descriptive statistics:
describe(), value counts, correlation matrices - Series for one-dimensional labeled data
Machine Learning
Machine Learning
Classical ML models with scikit-learn-inspired API
- Linear models: LinearRegression, Ridge, Lasso, LogisticRegression
- Tree-based: DecisionTreeClassifier/Regressor, RandomForestClassifier/Regressor
- Ensemble: GradientBoostingClassifier/Regressor
- SVM: LinearSVC, LinearSVR
- Neighbors: KNeighborsClassifier, KNeighborsRegressor
- Naive Bayes: GaussianNB
- Clustering: KMeans, DBSCAN
- Dimensionality reduction: PCA, t-SNE
Neural Networks
Neural Networks
Deep learning layers and modules for building custom architectures
- Layers: Linear, Conv1d, Conv2d, MaxPool2d, AvgPool2d
- Recurrent: RNN, LSTM, GRU
- Attention: MultiheadAttention, TransformerEncoderLayer
- Normalization: BatchNorm1d, LayerNorm
- Regularization: Dropout
- Losses: MSE, MAE, CrossEntropy, BCE, Huber
Linear Algebra & Statistics
Linear Algebra & Statistics
Advanced mathematical operations for scientific computing
- Decompositions: SVD, QR, LU, Cholesky, Eigenvalue (eig, eigh)
- Solvers: solve(), lstsq(), solveTriangular()
- Properties: det(), trace(), matrixRank(), cond(), norm()
- Statistics: mean, median, mode, variance, std, skewness, kurtosis
- Hypothesis tests: t-tests, ANOVA, chi-square, Shapiro-Wilk, Mann-Whitney U
Preprocessing & Optimization
Preprocessing & Optimization
Complete ML pipeline utilities for data preparation and model training
- Scalers: StandardScaler, MinMaxScaler, RobustScaler, Normalizer
- Encoders: LabelEncoder, OneHotEncoder, OrdinalEncoder
- Splitting: trainTestSplit, KFold, StratifiedKFold
- Optimizers: SGD, Adam, AdamW, RMSprop, Adagrad
- LR Schedulers: StepLR, CosineAnnealingLR, OneCycleLR
Why Deepbox?
Type-Safe
Built with TypeScript for excellent IDE support and compile-time safety
Zero Dependencies
No runtime dependencies - just pure TypeScript
Production Ready
4,344 tests ensure reliability and correctness
Modular Design
Import only what you need for optimal bundle size
Node.js Native
Works seamlessly in Node.js >= 24.13.0
Competitive Performance
Pure TypeScript implementation with competitive performance
Quick Example
Next Steps
Installation Guide
Install Deepbox and set up your development environment
Quick Start Tutorial
Build your first Deepbox application in minutes
Core Concepts
Understand the fundamental concepts behind Deepbox
Examples
Explore practical examples and use cases