Public
Edited
Sep 14, 2024
Paused
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// Since this notebook focuses on Gaussian regression, adjusting the number of iterations is not a needed feature.
viewof iterations = Inputs.range([100, 2000], {value: 1000, step: 100, label: "Iterations"})
Insert cell
// Define bounds for the parameters
Opt = {
return {
maxIter: iterations, // Optional
bounds: [
[-Infinity, Infinity], // Bounds for p[0]
[-Infinity, Infinity], // Bounds for p[1]
[0, Infinity], // Bounds for p[2]
],
};
};
Insert cell
// Gaussian model
model = (x, p) => x.map(x_i => p[0] * Math.exp(-0.5 * Math.pow((x_i - p[1]) / p[2], 2)));
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more