c# - How do I normalize Non-CSV data in Encog -


so i'm using jeff heaton's neural network library.

when trying solve iris plant classification problem have issue data normalization.

i able normalize csv file using following method:

public void normalizefile(fileinfo sourcedatafile, fileinfo normalizeddatafile, fileinfo normalizationconfigfile)     {          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);          // save normalization configuration, can used later denormalize raw output.         _analyst.save(normalizationconfigfile);      } 

so far good... program works high degree of accuracy.

the problem occurs when want enter values console application.

i have input data

  • sepal width
  • sepal length
  • petal width
  • petal length

each of these values has different high/low normalize these values can feed them network without writing csv file disk.

according link can using encog.util.arrayutil.normalizearray :

i assume data stored in double[]

encog.util.arrayutil.normalizearray normalizer = new encog.util.arrayutil.normalizearray(); var normalizeddata = normalizer.process(datamatrix, 0, 1);//(yourdata, low, high) 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -