Public
Edited
Dec 11, 2022
Insert cell
Insert cell
ml = import("https://cdn.skypack.dev/ml-convolution@2")
Insert cell
Insert cell
Insert cell
Insert cell
convolution = ml.directConvolution(
values,
Array.from({ length: kernel }, () => 1 / kernel),
"CUT"
)
Insert cell
Plot.plot({
marks: [
Plot.lineY(values, { stroke: "steelblue" }),
Plot.lineY(convolution, { stroke: "blue" }),
Plot.ruleY([0])
]
})
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