Can anyone point me in the direction of how to approach this problem?
I have a dataset with labels -1, 0 and 1.
My only idea is to use use tanh to output labels -1, 0 and 1.
But I wouldn’t know how to change the cost function, since it depends on labels being 0 and 1.
Also the 0 region of tanh is too small compared to -1 and 1. So i’m out of ideas here.
Hope I chose the right category to ask this question.
Thanks for any help.
Construct your NN with the last layer as a Dense layer with number of classes (3 in your case).
Your labels are -1, 0 and 1. As you might have guessed, -1 cannot be predicted by the neural network since the minimum index is 0. So, make your labels 0, 1, 2 i.e. increase them by 1.
If you are following the tensorflow link to create the model, rest should be straight forward.
The underlying function in play here is softmax. Hence the use of from_logits=True in the loss function since the final layer activation function is linear.