1
$\begingroup$

Given a shallow or deep neural network, how would one go about using both continuous numerical input features and categorical features?

For example, given a network that receives a set of 100 continuous numerical values between 0 and 1 representing monetary value, how would I also include a time component? I would suspect one would have to discretize/translate intraday hours and minutes, e.g. 21:35 into bins of say 1 hour. This would yield a one-hot vector that I would then append to my input data that flows into the network. Would this be a valid approach?

$\endgroup$
  • $\begingroup$ What is your definition of a neural network? As far as I remember, the input does not have to be categorial, you can also have neurons accepting continuous data. $\endgroup$ – Stefan Feb 7 at 18:19
0
$\begingroup$

I refer the book Introduction to Machine Learning with Python (Müller and Guido) translated from French: "The neural networks are expecting all features to vary/change in a similar way, ideally a mean of 0 and a variance of 1". So I do not think to use a discretisation is a good idea, so to avoid bins feature or one-hot encoding is wise I guess.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.