Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added interactive regression example for NeuralNetwork class #843

Merged
merged 3 commits into from
Apr 17, 2020
Merged

added interactive regression example for NeuralNetwork class #843

merged 3 commits into from
Apr 17, 2020

Conversation

LudwigStumpp
Copy link
Contributor

Dear ml5 community,

I'm making a Pull Request(PR). Please see the details below.

β†’ Step 1: Which branch are you submitting to? 🌲

development to add an example for Regression on the NeuralNetwork class

β†’ Step 2: Describe your Pull Request πŸ“

Important: This replaces ml5js/ml5-examples#257 due to examples now being added to the ml5-library repository.

I am submitting a new interactive example for Regression using the NeuralNetwork class.

Previously there were some problems with it, described at #721. Basically, the issue was that not all data points were taken into account (since the validationSplit parameter of the NeuralNetwork training option was permanently set to 0.1).

But since this issue is now closed and changes were merged to the development branch (see f749d4e; src/NeuralNetwork/NeuralNetwork.js; line 108) the example now works as expected.

The idea behind this example is that one can add multiple data points to use regression to fit a line. The already present example of NeuralNetwork_Simple_Regression does not have the feature to add points interactively + to change some core model parameters. This is why I wanted to share this example.

One can add data points and modify:

  • learningRate
  • hiddenUnits
  • batchSize
  • epochs

and see the changes.

I would not be upset if you decide not to add this example, since it might be a little bit redundant compared to NeuralNetwork_Simple_Regression.

β†’ Step 4: Screenshots or Relevant Documentation πŸ–Ό

Here's some helpful screenshots and/or documentation of the new feature

71031852-86a14580-2114-11ea-8770-82cb3de018b3

@joeyklee
Copy link
Contributor

@bomanimc I would propose for now that we merge this into /examples for now so that others may more easily use it and then as we decide on a structure or system for "demos" we can adjust as needed.

With the proposal of the "gates.json" approach #917, we might actually add a flag that determines whether something is delivered as a Demo or a example which might allow us to then keep everything in the "examples" directory?

@joeyklee
Copy link
Contributor

Merging now!

@joeyklee joeyklee merged commit 29b8e3d into ml5js:development Apr 17, 2020
@LudwigStumpp LudwigStumpp deleted the interactive-regression-example branch April 17, 2020 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants