# Discretizing a Continuous Input for an Artificial Neural Network

A question similar to this was asked before but the question wasn't answered in enough detail to explain what I'm wondering about.

I've been reading introductory material to Artificial Neural Networks (ANN). The examples given for inputs of continuous values always use a single input neuron which takes the value of the variable. This is like the first diagram below.

To me this seems limiting. If a continuous variable X can take values between 1 and 10 then rather than having a single input neuron with a value x one could create two input neurons. If x is small (between 1 and 5) the first neuron is activated, if x is big (between 5 and 10) the second neuron is activated. This is like the second diagram below.

This input in the second diagram discretizes x so it loses some information about x, but I think this could be useful if the response to x should change depending on whether x is small or big. For example, if an ANN is to determine whether somebody is male or female given an image and the persons age. The ANN should look for different distinguishing features depending on whether the person has a low age or a high age.

Is this sort of discritization used in practice? Does it have great disadvantages and is it still useful in certain situations?

• Not sure I understand what the advantage would be. Basically you are applying a function before feeding in the input to the network already (the 0 or 1 decision for both inputs is the function I am talking about) - why would you not model this function as part of the network? Or am I misunderstanding something?
– Pugl
Sep 5 '15 at 21:45
• @Pegah Perhaps this simple example will show the advantage. Suppose the task is to square a number 'x' between 1 and 10. If the neural network with few neurons has just 1 input with the value x it is going to have a hard time finding weights to suit cases for x=1 and x=10 because squaring is nonlinear. On the other hand if there were 2 input neurons which indicate if x lies between 1 and 5 or 5 and 10 then it can find weights which suit either the case where x is small or the case where x is large. I'm imagining it ending up like a piecewise linear function approximating the square function.
– Hugh
Sep 5 '15 at 22:59