-
Notifications
You must be signed in to change notification settings - Fork 3
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
Create Neuron.Activation class or factory #88
Comments
From my understanding that sounds good. Will there be an easy way to iterate over them? Also, is there a way to "choose" one for you? |
Since it is just an object you can loop over them like: // lodash
_.each(Neuron.Activation, (activation, name) => {...})
// vanilla js
Object.keys(Neuron.Activation).forEach(key => {
Neuron.Activation[key]
})
// or
for (const key in Neuron.Activation) {
if (Neuron.Activation.hasOwnProperty(key) {
// do stuff
}
} There are possibly heuristics we can use to try and find an activation function for you. It might require asking some questions or something. Realistically, I think knowing what they do and what they are good at is essential to good machine learning. Also, experimenting is really fun and another great way to |
👍 thanks for explaining So you'd make |
You're right, in these cases it would totally pick up Thanks for the dive in and catching that. Night night 🌝 |
Currently there is an activation namespace. Its members are activation function definitions. These are objects with
func
,prime
,rangeMin
, andrangeMax
properties.These objects should be created by a class or factory so they can be validated, extended, and created consistently. For better cohesion, this should be a static Neuron class or factory. Same for the namespace, it should likely be a Neuron namespace.
We should likely end up with something along the lines of:
EDIT
Also, finish the docs in the Neuron class while at this. There are missing and incomplete doc strings here.
The text was updated successfully, but these errors were encountered: