Requirements
Before installing Deepbox, ensure your system meets the following requirements:Node.js Version: Deepbox requires Node.js
>= 24.13.0Install Deepbox
Install Deepbox using your preferred package manager:Verify Installation
Create a simple test file to verify your installation:test.ts
tensor([5, 7, 9]), congratulations! Deepbox is installed correctly.
Import Strategies
Deepbox provides flexible import strategies to suit your needs:Per-Module Imports (Recommended)
Import from specific modules for optimal tree-shaking and smaller bundle sizes:Namespace Imports
Use namespace imports when you prefer explicit module prefixes:Available Modules
Deepbox is organized into the following modules:deepbox/core
deepbox/core
Types, errors, validation, dtype helpers, and configuration
deepbox/ndarray
deepbox/ndarray
N-D tensors with autograd, broadcasting, 90+ operations, and sparse matrices
deepbox/linalg
deepbox/linalg
SVD, QR, LU, Cholesky, eigenvalue decomposition, solvers, and norms
deepbox/dataframe
deepbox/dataframe
DataFrame and Series with 50+ operations and CSV I/O
deepbox/stats
deepbox/stats
Descriptive stats, correlations, and hypothesis tests
deepbox/metrics
deepbox/metrics
40+ ML metrics for classification, regression, and clustering
deepbox/preprocess
deepbox/preprocess
Scalers, encoders, normalizers, and cross-validation splits
deepbox/ml
deepbox/ml
Classical ML models (Linear, Ridge, Lasso, Trees, SVM, KNN, Ensembles)
deepbox/nn
deepbox/nn
Neural network layers (Linear, Conv, RNN/LSTM/GRU, Attention, Normalization)
deepbox/optim
deepbox/optim
Optimizers (SGD, Adam, AdamW, RMSprop) and LR schedulers
deepbox/random
deepbox/random
Distributions (uniform, normal, binomial, gamma, beta) and sampling
deepbox/datasets
deepbox/datasets
Built-in datasets (Iris, Digits, Breast Cancer) and synthetic generators
deepbox/plot
deepbox/plot
SVG/PNG plotting (scatter, line, bar, histogram, heatmap, contour)
TypeScript Configuration
For the best development experience, configure yourtsconfig.json:
tsconfig.json
Package Information
Deepbox is published to npm with the following characteristics:- Package name:
deepbox - Current version:
0.2.0 - License: MIT
- Bundle format: ESM and CommonJS
- Type definitions: Included
- Runtime dependencies: Zero
Module Exports
Deepbox uses modern ESM exports with CommonJS fallbacks:package.json
Next Steps
Quick Start Guide
Build your first Deepbox application in 5 minutes
Core Concepts
Learn about tensors, autograd, and broadcasting
API Reference
Explore the complete API documentation
Examples
See practical examples and use cases
Troubleshooting
Module resolution errors
Module resolution errors
If you encounter module resolution errors, ensure:
- Your Node.js version is >= 24.13.0
- Your
tsconfig.jsonhas"moduleResolution": "bundler"or"node16" - You’re using a compatible bundler (Vite, esbuild, Rollup, Webpack 5+)
Type errors
Type errors
If you see TypeScript errors:
- Ensure you have
"strict": truein yourtsconfig.json - Install
@types/nodeif you haven’t already - Clear your TypeScript cache:
rm -rf node_modules/.cache
Out of memory errors
Out of memory errors
For large tensor operations, you may need to increase Node.js memory:
Need help? Check the GitHub Issues or open a new issue.