So I have been thinking about https://github.com/BrainJS/brain.js/issues/99 and I think another thing that can get new users bogged down is how many methods and variables are exposed. For example in the REPL I instantiate a simple NeuralNetwork and her are the things I have control over:

How many of these do we actually want the user to be interacting with? If the user trains a network, then randomly calls initialize with some given size their network is dust in the wind.
I think if we take the methods that are meant to only be used internally within the class and declare them in the constructor (or some other scheme for having them not public). I think that might also help those new to the library. I don't mind doing this If you want me to.
I'm hesitant to alter those items because of a few reasons:
So maybe if the community starts to respond: "Hey, yea, this has always bugged me, lets make it so!" then I'd be on board, but for now, I want to focus on innovation.
I'm really loving this energy!
Sounds good, I guess we can leave this open for a few weeks and if no one has shown interest let's just close the issue.
good call!
if you are interested though, visit some of the issue people are having with the net, and if you have time, resolve one or two.
It's addictive to help people.
I'm currently working on this one: https://github.com/BrainJS/brain.js/issues/102#issuecomment-356620201
So I was talking to @robertleeplummerjr about this a bit. The main thing I think would help new users is a more clear interface on which methods are meant for them to interact with. At the same time, I think for those looking through the code it would be more clear to have smaller functions in the neural-network itself, so it is easier to read and understand.
How about adding _ before methods that are meant to be private?
This would let us break out private functions into smaller and easier to read methods, without confusing those starting with the library, since the publicly intended functions are a bit more explicit.
Thoughts?
I like and welcome this approach.
Handled in https://github.com/BrainJS/brain.js/pull/137
Most helpful comment
So I was talking to @robertleeplummerjr about this a bit. The main thing I think would help new users is a more clear interface on which methods are meant for them to interact with. At the same time, I think for those looking through the code it would be more clear to have smaller functions in the neural-network itself, so it is easier to read and understand.
How about adding
_before methods that are meant to be private?This would let us break out private functions into smaller and easier to read methods, without confusing those starting with the library, since the publicly intended functions are a bit more explicit.
Thoughts?