regressio 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -297,27 +297,36 @@ console.log(C.trace()); // 5
297
297
  console.log(C.transpose().toArray());
298
298
  ```
299
299
 
300
- ## WASM Engine (Optional)
300
+ ## WASM Acceleration
301
301
 
302
- For faster matrix operations on large datasets, build and load the Rust/WASM engine. When active, `Matrix.multiply()`, QR decomposition, Cholesky decomposition, and back-substitution are dispatched to compiled Rust code.
302
+ regressio ships with a pre-compiled Rust/WASM engine that activates automatically no configuration needed. When the WASM binary is available, heavy computations are dispatched to compiled Rust code for significantly faster execution.
303
303
 
304
- ```bash
305
- cd rust && wasm-pack build --target bundler --out-dir ../pkg
306
- ```
304
+ **Accelerated operations:**
305
+ - Matrix: multiply, transpose, add, subtract, scale, dot product, norm, determinant
306
+ - Decompositions: QR, Cholesky, SVD, eigenvalues (tridiagonal QL)
307
+ - Solvers: forward/back substitution
308
+ - Models: Lasso/Elastic Net coordinate descent, logistic regression IRLS, softmax, KNN distance matrices
309
+ - Diagnostics: correlation matrix, VIF (via correlation matrix inverse)
310
+ - Predictions: bootstrap OLS (1000+ resamples in a single WASM call)
311
+
312
+ If WASM is unavailable (e.g. unsupported runtime), all operations fall back silently to pure TypeScript.
307
313
 
308
314
  ```typescript
309
- import { useWasmEngine, useTypescriptEngine, isWasmActive, getEngine } from 'regressio';
315
+ import { isWasmActive } from 'regressio';
310
316
 
311
- // Load WASM engine (async, loads the .wasm file)
312
- await useWasmEngine();
313
- console.log(isWasmActive()); // true
317
+ console.log(isWasmActive()); // true if WASM loaded
314
318
 
315
- // All subsequent matrix operations use WASM
319
+ // Everything just works WASM is used transparently
316
320
  const model = new LinearRegression();
317
321
  model.fit(X, y); // QR decomposition runs in Rust
322
+ ```
318
323
 
319
- // Switch back to pure TypeScript
320
- useTypescriptEngine();
324
+ ### Rebuilding WASM
325
+
326
+ The pre-built WASM binary is included in the package. To rebuild from Rust source (requires [Rust](https://rustup.rs/) with `wasm32-unknown-unknown` target):
327
+
328
+ ```bash
329
+ bun run build:wasm
321
330
  ```
322
331
 
323
332
  ## License