nox73 / go-neural Goto Github PK
View Code? Open in Web Editor NEWNeural network implementation on golang
Neural network implementation on golang
I was just checking out the least squares algorithm in the learn.Evaluation()
method and I can't find the maths to back up the algorithm used. Would you be able to point me in the right direction?
Why isn't the Means Square Error being used here? Example:
func Evaluation(n *neural.Network, in, ideal []float64) float64 {
out := n.Calculate(in)
var e float64
for i, _ := range out {
e += math.Pow(out[i]-ideal[i], 2)
}
return e / float64(len(out))
}
I'm not sure the randomization of the Weights on synapses is correct.
func (n *Network) RandomizeSynapses() {
for _, l := range n.Layers {
for _, n := range l.Neurons {
for _, s := range n.InSynapses {
s.Weight = 2 * (rand.Float64() - 0.5)
}
}
}
}
[1] - Negnevitsky, Michael. 2011., Artificial Intelligence. [online]. Addison Wesley.
Hola Alex.
I've forked your neural nets implementation and currently try to build rich training and evaluation function around it.
Would be very helpful if you could provide a license for the code. If you tend to use one of these 3 licenses we can work together on the code: MIT, Apache 2.0 and BSD3.
Thanks in advance! Best, Alex
Convolutional layers are important for things like image processing, where the input layer is multidimensional. It would be great if this library could support them.
It seems that your library supports the idea of supervised learning, but would it be able to support unsupervised learning?
Perhaps varying weights as per some genetic algorithm and the user can provide a cost function?
Is there already functionality for this that I have missed?
Okay, actual question with the library now, not just me being stupid with neural networks.
How can I use this to predict continuous outputs? I want to use this to predict the time it takes to do something, based on 3 variables so classes don't really work.
It would be great if go-neural would be a little more idiomatic in terms of error handling. Especially the engine package throws panics where the error could be returned and then handled properly instead.
The result from n.Calculate isn't what I'd expect. The result always seems to be less than 1, is this intentional?
The dataset I'm training it on looks like:
{{col1, col2, col3},{class}},
{{20.625, 4.93, 22.95}, {5.39966}},
{{20.187, 4.63, 20.2894}, {0.109825}},
{{20.187, 4.63, 22.5018}, {6.87624}},
{{17.375, 7.44, 20.5605}, {16.6633}},
{{17.187, 7.44, 17.5643}, {0.738668}},
{{17.75, 7.44, 20.4978}, {10.664}},
Yet all my results seem to be like 0.9009051956176022
which lead me to think the result needed to be multiplied by 10 to get a suitable class, but when testing the network on inputs that should be classed >10, I still got results less than 1. What could be going wrong?
The package "launchpad.net/gocheck" had been moved to "github.com/go-check/check". It would be great to update it accordingly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.