# Learning a perceptron from stream data

I want to train a Perceptron using stochastic gradient rulefrom the stream data. I have very limited amount of memory and i can store only $$N$$ examples.

Suppose my population consist of point as show in the following picture:

Now suppose my first $$N$$ examples come in following fashion and i can classify them correctly as show in the next picture:

Now the problem is if the next $$N$$ examples come in this way:

and i have classified them as shown. The problem is that since i can't train perceptron for previous $$N$$ examples(because i can store only $$N$$ examples and previous $$N$$ examples need to be thrown away) and training on next $$N$$ examples contradicts the hyper-plane for previous $$N$$ examples.

How to train a perceptron from stream data? Do i need to store all examples or there is an alternative way?

After the first $$N$$ examples, the separator you got is after its rigorous adjustments through shift and angular orientation operations from its initial position. These adjustments are done by the weights of the data of each dimension. So every time a new data arrives and fed to the perceptron, the weights changes accordingly (rate of change in error is calculated) and the separator gets a new position. Thus there is no question of storing old data and state. If your system is too low in memory to hold the neural network and the feature vector, then it will be handled by the OS through the virtual memory system.