[go: nahoru, domu]

TensorFlow.js: Polynomial Regression

Train a model to predict y-values for a cubic equation using a single layer perceptron

Description

This model learns to generate a curve to match a polynomial equation. It uses a single layer perceptron with 4 weights.

Data Generation

We generate training data using the following function and co-efficients. You can edit the co-efficients to generate new data and fit the model.

y = * x^3 + * x^2 + * x +

Training Parameters

Learning rate:
Epochs:

Model Output

We plot a curve using y-coordinate predictions the model has learned to make for each x-coordinate.