Click here to Skip to main content
12,295,482 members (58,040 online)
Click here to Skip to main content

Stats

114.9K views
6.8K downloads
78 bookmarked
Posted

Neural Network Classifier

, 29 Jan 2005 CPOL
A Multilayer perceptron used to classify blue and red points.
#pragma once
#include "Neuron.h"
class Synapse;

class Synapse
{
public:
	Synapse(void)
	{
		srand(time(0));
	};
	~Synapse(void)
	{};

	double weight;//weight between "to" and "from" neurons
	double data;
	Neuron* from;
	Neuron* to;

	Synapse(Neuron* f, Neuron* t, double w = MAXWORD)
	{
		ASSERT(f != NULL);
		ASSERT(t != NULL);
		from   = f;
		to     = t;
		if(w != MAXWORD)
			weight = w;
		else
            weight = (double)rand()/RAND_MAX;
		data   = 0.0;
		f->outlinks.AddTail(this);
		t->inlinks.AddTail(this);
	}
public:
	double getWeight()
	{
		return weight;
	}
};

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 Code Project Open License (CPOL)

Share

About the Author

Hossein Khosravi
Software Developer (Senior) FarsiOCR.ir
Iran (Islamic Republic of) Iran (Islamic Republic of)
Currently I'm working at Dept. of Electrical Engineering in University of Shahrood.
Pattern Recognition (specially OCR), Neural Networks, Image Processing and Machine Vision are my interests. However I'm a PROGRAMMER as well.
BSc: Sharif University of technology @ 2002
MSc. and PhD: Tarbiat Modarres University @ 2006 & 2010 respectively

Personal Blog: Andisheh Online

Religious Blogs: Shia Muslims , Ashura , Islamic Quotes

Commercial Site: Farsi OCR

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160525.2 | Last Updated 30 Jan 2005
Article Copyright 2005 by Hossein Khosravi
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid