jeffheaton / encog-java-core

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

VersatileMLDataSet.analyze() calculates incorrect standard deviation value #200

Closed ilmarsL closed 6 years ago

ilmarsL commented 9 years ago

The loop summing standart deviation for the column takes values from the wrong columns. Problem seems to originate frome here:

// Sum the standard deviation
        this.source.rewind();
        while ((line = this.source.readLine()) != null) {
            for (int i = 0; i < this.helper.getSourceColumns().size(); i++) {
                ColumnDefinition colDef = this.helper.getSourceColumns().get(i);
                String value = line[i];

Replacing String value = line[i]; with String value = line[colDef.getIndex()]; appears to fix the problem.

jeffheaton commented 6 years ago

Fixed previously with this commit.