Gaussian Processes
Use Gaussian process regression for predictions with uncertainty and Gaussian process classification for class probabilities in the browser or Node.js with @kanaries/ml.
View as MarkdownGaussian processes
Suppose you have a few sensor readings taken at unevenly spaced positions. A Gaussian process can use the distance between measurements to estimate the reading at a new position and how uncertain that estimate is. For labeled observations, the same idea can estimate the probability of each operating state.
The GaussianProcess module in @kanaries/ml runs in the browser and Node.js. Both estimators use a radial basis function (RBF) kernel. Its length scale controls the distance over which observations influence each other. Start with features in comparable units, or choose a separate length scale for each feature.
| If you need | Use |
|---|---|
| A continuous estimate with a standard deviation for each prediction, or a covariance matrix for a set of predictions | Gaussian process regression |
| Class labels and per-class probabilities | Gaussian process classification |
Both estimators factor dense matrices with one row per training observation. Training memory grows quadratically with sample count, so these estimators are best suited to small datasets.
Nyström Kernel Approximation in JavaScript with Nystroem
Use @kanaries/ml to build nonlinear features from sampled landmarks with the Nyström method in JavaScript or TypeScript for browser and Node.js models.
Gaussian Process Regression
Fit a smooth curve and predict its uncertainty with GaussianProcessRegressor in @kanaries/ml, using the same JavaScript API in the browser and Node.js.