# Neural Network: MLP for regression with 3 continuous features, 1 categorical

I am starting to study Neural Network. I want to build a MLP where I will feed it:

• 3 features which are continuous
• one feature which is categorical (48 classes)

How can I do this?

Before adding the categorical feature, I was using 'relu' activation function and 'lbfgs' as a solver in MLPRegrssor in sklearn.

I was wondering: how can I integrate this variable into the network? Should I do one-hot encoding? Should I keep relu as activation function or should I try sigmoid, softmax or something like that?

• One-hot encoding is the typical approach yes. You activation function is a hyper-parameter of the network, you can choose what works best based on your evaluation criteria. – Bar Oct 6 '17 at 14:24

The standard approach is to one-hot encode your categorical variable. Suppose that categorical variable has $k$ categories. You'll have $k +3$ input neurons: one for each category, and three for your continuous-valued features.