jeffheaton / encog-java-core

http://www.heatonresearch.com/encog
Other
742 stars 268 forks source link

"Introducing the Kohonen Neural Network" article bug #208

Closed dbalabka closed 7 years ago

dbalabka commented 9 years ago

Hi,

Firstly sorry about that may be my report is not in appropriate place. I have found that dot product is calculated incorrectly in article "Introducing the Kohonen Neural Network" in section "Calculating Each Neuron's Output". Here is source link: http://www.heatonresearch.com/articles/6/page2.html Current version: | 0.5 0.75 | * | 0.1 0.2 | = (0.5 * 0.75) + (0.1 * 0.2) but must be: | 0.5 0.75 | * | 0.1 0.2 | = (0.5 * 0.1) + (0.75 * 0.2) There is a probability that I'm wrong, but according to dotProduct method implementation it should be a bug:

double dotProduct(double vec1[] , double vec2[] )  
{
    ...
    while ( (k--)>0 ) {
        rtn += vec1[v] * vec2[v];
        v++;
    }
    ....
}
jeffheaton commented 7 years ago

Thanks for the report. That article is not present in my current website redesign, so I am closing the issue.