2

I'd like to get a recommendation how to attack a problem of predicting multiple numbers. Training data contains 4 columns, each says a probability of record being in the bucket. So, for example: X = [0.25, 0.5, 0.25, 0.0] and corresponding output should be e.g. Y = [0.8, 0.1, 0.0, 0.1]. Each row should sum to 1.0

What type of approach would you recommend?

I already tried simple neural network with 4 neurons in the last layer and softmax activation but wondering if there is a better solution.

Thanks!

  • What's Y? softmax tends to give a low variance probabilty – David Taub May 28 '18 at 12:10
  • let's say I have a system that estimates a age distribution in a group of people. X says their age distribution. For example x[0] is 0-18 years, x[1] = 19-40 years, x[2] = 41-60 years and x[3] is 61+ years. x[0] = 0.25 means 25% of people belong to the age group 0-18 years. And Y contains real distribution. – Peter Krejzl May 28 '18 at 12:19
  • Still confused. When creating the dataset, how did you create X and Y? Also, how will you use the predictor afterwards? – David Taub May 28 '18 at 13:00
  • You can have an image of people and would like to estimate their ages. There is a system that generates these estimates (X) but I know it's not entirely correct (because I have several thousands of manually labelled images) and I'd like to build a system that reduce the error. HTH – Peter Krejzl May 28 '18 at 13:05

1 Answers1

2

I would recommend using an encoder-decoder structure based on LSTM-RNN for sequence-to-sequence learning; it will provide you with exactly what you want. A link that I find very helpful is:

https://machinelearningmastery.com/define-encoder-decoder-sequence-sequence-model-neural-machine-translation-keras/

pcko1
  • 3,940
  • 2
  • 15
  • 29
  • Thanks a lot for your suggestion, it is very interesting. Unfortunately, I think using seq 2 seq approach I think I can't guarantee that generated numbers will sum to 100%. – Peter Krejzl May 31 '18 at 19:47
  • 1
    True. What you can do is to insert a custom "Lambda Layer" AFTER the seq2seq structure to sum all the outputs into 1 and train the network to learn it! Take a look at how Lambda Layers works in Keras documentation and also check this very helpful example [https://stackoverflow.com/questions/44886195/how-to-use-lambda-layer-in-keras] :) – pcko1 May 31 '18 at 19:55