Solved – Discretizing a Continuous Input for an Artificial Neural Network

machine learningneural networks

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?

Continuous input
Discrete input

Best Answer

You're touching on problem formulation, where the designer defines input variables and their characteristics. Looking at the structure you show, if you were trying to predict whether a liquid is frozen or solid, such a structure would be useful. If you were trying to predict a future value of the variable, then it would be much less useful. So your question is quite abstract, and so the answer is yes such a structure is surely used and has advantages in certain circumstances. But the challenge in machine learning is the inverse of the challenge you propose. Given a problem that needs a solution, what are the best variables and model to solve the problem.