Skip to content
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

Encog.ML.Data.Versatile.VersatileMLDataSet.Analyze() Bug #113

Open
ericbmartin opened this issue Dec 6, 2017 · 0 comments
Open

Encog.ML.Data.Versatile.VersatileMLDataSet.Analyze() Bug #113

ericbmartin opened this issue Dec 6, 2017 · 0 comments

Comments

@ericbmartin
Copy link

ericbmartin commented Dec 6, 2017

The latest released code (3.4) has a bug in the VersatileMLDataSet.Analyze() line #137:

        // Sum the standard deviation
        _source.Rewind();
        while ((line = _source.ReadLine()) != null)
        {
            for (int i = 0; i < NormHelper.SourceColumns.Count; i++)
            {
                ColumnDefinition colDef = NormHelper.SourceColumns[i];
                **String value = line[i];**
                if (colDef.DataType == ColumnType.Continuous)
                {
                    double d = NormHelper.ParseDouble(value);
                    d = colDef.Mean - d;
                    d = d*d;
                    colDef.Sd = colDef.Sd + d;
                }
            }
        }

"String value = line[i];" does not account for skipped columns in the data - it should prob be replaced with something like "String value = line[FindIndex(colDef)];"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant