Skip to content

Instantly share code, notes, and snippets.

@meherhowji
Created March 30, 2019 04:10
Show Gist options
  • Save meherhowji/c66adfa15efb908091cb3de6fa875e5b to your computer and use it in GitHub Desktop.
Save meherhowji/c66adfa15efb908091cb3de6fa875e5b to your computer and use it in GitHub Desktop.
const trainModel = data => {
let weights = getRandomWeights();
let bias = getRandomBias();
for (let i = 0; i < 50000; i++) {
const randomIndex = getRandomIndex(data.length);
const input = getInput(data, randomIndex);
const target = getTarget(input);
const weightedSum = getWeightedInputSum(weights, input, bias);
...
...
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment