Skip to content

Instantly share code, notes, and snippets.

@KaiWedekind
Created September 4, 2018 18:42
Show Gist options
  • Save KaiWedekind/389bc7e9e62e643a377dfa530791b62f to your computer and use it in GitHub Desktop.
Save KaiWedekind/389bc7e9e62e643a377dfa530791b62f to your computer and use it in GitHub Desktop.

Revisions

  1. Kai Wedekind created this gist Sep 4, 2018.
    12 changes: 12 additions & 0 deletions color-prediction.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    'use strict'

    const brain = require('brain.js');
    const data = require('./training-data.json');

    const network = new brain.NeuralNetwork();

    network.train(data, { log: true });

    const result = network.run({ r: 0, g: 1, b: 0.65 });

    console.log('result', result);