0
$\begingroup$

I need to implement a neural network whose dataset and response are composed of only 0,1, -1 values. For those with experience, which setup would you recommend (activation function, loss, neurons, etc)? I haven't found much in the literature on dealing with categorical variables

$\endgroup$
2
  • 1
    $\begingroup$ Why does it have to be a neural network? And are the categories (-1, 0, 1) meaningfully ordered, or is that just how they've been encoded? $\endgroup$ Apr 20, 2021 at 18:01
  • $\begingroup$ Categories (-1, 0, 1) are meaningfully ordered $\endgroup$ Apr 21, 2021 at 8:59

1 Answer 1

0
$\begingroup$

The number of input and hidden neurons depends on how many input features you have. Activation functions used at the hidden layer could be either tanh or logistic, and probably linear activation on the output side. ANNs do like input features whose range is [-1,1].

I would start by using multiple linear regression, however, with a single dependent variable based on your -1, 0, and +1 values. The predicted output for each object would be assigned to +1 if $\hat{y}_i > 0.33$, 0 if $-0.33 < \hat{y}_i \leq 0.33$, and -1 if $\hat{y}_i \leq -0.33$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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