Public
Edited
Jun 7, 2023
Fork of Tensors
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
squaredTensor = tf.tensor([1, 2, 3]).pow(2)
Insert cell
Insert cell
squaredTensor.data()
Insert cell
Insert cell
pt(squaredTensor)
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
/* Using Tensor.js
predict = (x) =>
tf.sigmoid(
tf
.scalar(estimates.B0)
.add(tf.scalar(estimates.B1).mul(tf.tensor1d([x])))
) */
predict = (x) => 1 / (1 + Math.pow(Math.E, -(estimates.B0 + estimates.B1 * x)))
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Plotly = require("https://cdn.plot.ly/plotly-2.14.0.min.js")
Insert cell
Insert cell
tf = require('@tensorflow/tfjs@4.0.0/dist/tf.min.js')
Insert cell
Insert cell
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