Click here to Skip to main content
11,703,505 members (73,436 online)
Click here to Skip to main content
Add your own
alternative version

Backpropagation Artificial Neural Network in C++

, 20 May 2008 GPL3 114K 7K 100
This article demonstrates a backpropagation artificial neural network console application with validation and test sets for performance estimation using uneven distribution metrics.
ann_demo.zip
bin
ann1Dn.exe
dat
red.dat
red.hea
iris.nn
setosa_versi.dat
virgi.dat
void
ann_src.zip
src
Lib
LibNN
#pragma once



class CSignal
{

        int format;

        HANDLE fp, fpmap;
        LPVOID lpMap;


        bool read11(wchar_t *fname);           //obsolete
        //void read12(wchar_t *fname);         //obsolete
        bool read13(wchar_t *fname);

        void changeext(wchar_t *path, wchar_t *ext);


public:
        CSignal(wchar_t *fname);                  //open existing file
        CSignal(wchar_t *fname, int n, int m);    //create new
        ~CSignal();


        int N, M;                             //NxM size of mapped array
        vector<float *> data;                 //N array of pointers to filemapping
        wchar_t name[_MAX_PATH];              //file name


        void dump(wchar_t *fname);            //dump contents to text file

        void minmax(float *buff, int len, float &min, float &max);
        void nminmax(float *buff, int len, float a, float b);
        void nenergy(float *buff, int len, int L = 2);


};



/*
    reads data from list file

	1.      file1  1
                file2  2
		file3  1
		....

     files in separate files on disk    1.1 - simple text file
	                                1.2 - ecg like data (header in this file)
				        1.3 - mitbih like format (header in separate file *.hea  [N M])


    AI file format
    2.          file1  1
	        x1 x2 x3 ... xn
		file2  2
		x1 x2 x3 ... xn
		file3  1
		x1 x2 x3 ... xn
		...

     files data in this list file

*/

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)

Share

About the Author

Chesnokov Yuriy
Engineer
Russian Federation Russian Federation
Highly skilled Engineer with 14 years of experience in academia, R&D and commercial product development supporting full software life-cycle from idea to implementation and further support. During my academic career I was able to succeed in MIT Computers in Cardiology 2006 international challenge, as a R&D and SW engineer gain CodeProject MVP, find algorithmic solutions to quickly resolve tough customer problems to pass product requirements in tight deadlines. My key areas of expertise involve Object-Oriented
Analysis and Design OOAD, OOP, machine learning, natural language processing, face recognition, computer vision and image processing, wavelet analysis, digital signal processing in cardiology.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150819.1 | Last Updated 20 May 2008
Article Copyright 2007 by Chesnokov Yuriy
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid