deepbox
Quick Start
A minimal end-to-end workflow that covers tensors, DataFrames, preprocessing, and model fitting using the current v1.0.0 APIs.
quick-start.ts
import { DataFrame } from "deepbox/dataframe";import { LinearRegression } from "deepbox/ml";import { tensor } from "deepbox/ndarray";import { trainTestSplit } from "deepbox/preprocess";const X = tensor([[1], [2], [3], [4], [5], [6]]);const y = tensor([3, 5, 7, 9, 11, 13]);const [XTrain, XTest, yTrain, yTest] = trainTestSplit(X, y, { testSize: 0.33, randomState: 42,});const model = new LinearRegression();model.fit(XTrain, yTrain);const predictions = model.predict(XTest);const report = new DataFrame({ actual: yTest.toArray() as number[], predicted: predictions.toArray() as number[],});console.log(report.toString());Next steps
- Use deepbox/ndarray when you need numerical kernels and autograd.
- Move to deepbox/preprocess and deepbox/ml for estimator pipelines and evaluation.
- Use deepbox/nn and deepbox/optim for trainable module graphs and schedulers.
- Browse the 50 examples and 9 projects for larger compositions of the same APIs.