Normalization csv file by Encog C#

868 views Asked by At

I don't know how to normalize a csv file by using Encog C#..My csv data file:

7.7,3.8,6.7,2.2,\n 7.7,2.6,6.9,2.3,\n 6,2.2,5,1.5,6.9,\n

2

There are 2 answers

0
Safae On

Here http://www.heatonresearch.com/comment/2690#comment-2690 there's an answer to your question. I hope that it will help.

0
K-Dawg On

Here's a nice function to do it... of course you need to create an analyst

    private EncogAnalyst _analyst;

    public void NormalizeFile(FileInfo SourceDataFile, FileInfo NormalizedDataFile)
    {
        var wizard = new AnalystWizard(_analyst);
        wizard.Wizard(SourceDataFile, _useHeaders, AnalystFileFormat.DecpntComma);
        var norm = new AnalystNormalizeCSV();
        norm.Analyze(SourceDataFile, _useHeaders, CSVFormat.English, _analyst);
        norm.ProduceOutputHeaders = _useHeaders;
        norm.Normalize(NormalizedDataFile);
    }