Skip to content

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

@ericbmartin

Description

@ericbmartin

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)];"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions