Published
Edited
Mar 16, 2020
Insert cell
Insert cell
{
const { NeuralNetwork } = brain;
const net = new NeuralNetwork();
net.train([
{
input: [1,2,3,4,5],
output: [3]
},
{
input: [2,3,4,5,6],
output: [4]
},
{
input: [3,4,5,6,7],
output: [5]
},
{
input: [4,5,6,7,8],
output: [6]
},
], { activation: 'leaky-relu' });
return net.run([2,3,4,5,6]);
}
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