Git Product home page Git Product logo

Comments (8)

dnouri avatar dnouri commented on July 20, 2024

I think right now you can do a np.random.seed(42) before training and it'll be deterministic?

from nolearn.

run2 avatar run2 commented on July 20, 2024

Sure yes. I just wanted to check if you want to add it as a option. I will close this and you can reopen it if and when you want to.

from nolearn.

cancan101 avatar cancan101 commented on July 20, 2024

The default for KFold is actually NOT to shuffle (i.e. it is deterministic):
https://github.com/scikit-learn/scikit-learn/blob/38104ff4e8f1c9c39a6f272eff7818b75a27da46/sklearn/cross_validation.py#L320

from nolearn.

dnouri avatar dnouri commented on July 20, 2024

Ah yes, very useful if your data is not independently distributed.

from nolearn.

cancan101 avatar cancan101 commented on July 20, 2024

It might be worth tossing a note in the nolearn docs along the lines of:

By default no shuffling occurs, including for the (stratified) K fold cross- validation....Keep in mind that train_test_split still returns a random split.

Related: #12

from nolearn.

dnouri avatar dnouri commented on July 20, 2024

Yes, you're right. And that reminds me that I should be working on proper docstrings soon.

from nolearn.

neilsummers avatar neilsummers commented on July 20, 2024

From what I can see there is more randomness than just in the train test splits. From the tests I have done there is randomness when I include a dropout layer. I can't seem to make this the same for each run by doing a np.random.seed(42) before the run. I have tried tracing it back throug the source, and it appears to be setting a seed by default in RandomStreams from theano, which is called in the DropoutLayer, but I am still getting changes from run to run when I include a DropoutLayer, but no changes when there is no DropoutLayer.

from nolearn.

dnouri avatar dnouri commented on July 20, 2024

There's an issue for that in Lasagne: Lasagne/Lasagne#6

from nolearn.

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.