Giter Club home page Giter Club logo

Comments (8)

cazala avatar cazala commented on August 20, 2024

no, we're missing a cross-validation feature, but the Trainer has train and test methods, both take a dataset of the same shape. So you could split the dataset into a training set and a test set, run the train for N iterations and then run the test, that will return the error. Put all that within a while untill the error is smaller than your desired error and it should work.

from synaptic.

agamm avatar agamm commented on August 20, 2024

Is this something you would like to see implemented as a PR addition?

from synaptic.

cazala avatar cazala commented on August 20, 2024

Yes! that would be a handy feature that we're are missing right now

from synaptic.

agamm avatar agamm commented on August 20, 2024

I'm working on it :bowtie:
Currently I am adding a function to the Trainer Object prototype called trainSplit

  1. Should this even be a function?
    1. Do you have a better name for the function? (I feel like it may use some help)
    2. I need at least 3 more options, should I add them to the Trainer object or make them separate parameters to my function.
    3. Should I let users to give options to the "inner" trainer I am using or should I use the defaults?
  2. Should this be a separate object at all (ie not in the Trainer Object)?
  3. I think it could be nice to add a few more options for training the data like KFold,Shuffle and Split etc... How do you see them being incorporated or do you want to keep things simplistic for now?

from synaptic.

cazala avatar cazala commented on August 20, 2024

mm I what do you think about adding this as another option for the Trainer#train(dataset:Array, options:Object) method? Like crossValidate: { testSize: .3, testError: .01 }, that would take a 30% of the dataset for validation, and the trainer would iterate until the error of the tests go below .01 .. in the end it would be like another break condition for the training, same as error and iterations.

And yea, I think it would be great to add more options for training, but I don't know what do you mean by shuffle tho, we already have a shuffle flag in the options, that shuffle the whole dataset after each iteration, is that what you meant?

from synaptic.

agamm avatar agamm commented on August 20, 2024

I crated a pull request (#61).
BTW, just as a thought experiment. Maybe we are making our model over-fit to the testSet?

K-means can be the next PR if this gets merged I guess.

I had another Idea to create some kind of plotting tool. When I created my tests it was really useful to plot the inputs and their corresponding outputs that the network made - do you think this is something that is adequate for this repo?

from synaptic.

cazala avatar cazala commented on August 20, 2024

Hey, I just reviewed and merged your PR. About the plotting tool, I think that would be a great addition, we have support for a very basic DOT lang plotting so far, using Network#toDot(), that returns the DOT lang code and a link to google charts, with a basic plot of your network's layers. Maybe you can use that or expand it if you wish, idk, any contributions are welcome (:

from synaptic.

agamm avatar agamm commented on August 20, 2024

Fixed the tests and the options bug in #64. I'll look into implementing a plotting tool :)

from synaptic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.