1
$\begingroup$

This is my first question in the DS-community, so I'm happily willing to accept any kind of (meta-) advice :).

I have time-series data for a set of users (~100), whereas each 15 min it is logged to which antenna (~80) they were connected (similar to cell phone connections).

Based on this data, I created a density vector, which for some time t (i.e. 01.01.2016 at 06:00) counts how many users are connected to which antenna.

Such a density object (for same day and time as given above) might look like this:

  • 100: 5;
  • 101: 2;
  • 102: 3;
  • 103: 0;

whereas the first number refers to some ID of the antenna, and the 2nd number refers to the number of users connected to the antenna.

I'm planning to feed this time-series data to a recurrent neural network.

The results should be the predicted number of users connected to the antenna at the next time step (so every 15 minutes). So it might predict for 01.01.2016 at 06:15:

  • 100: 7;
  • 101: 0;
  • 102: 1;
  • 103: 2;

Now I'm wondering what should the output layer be like? Regarding number of neurons and activation function especially. I've been reading quite a lot about multinomial logistic regression but some confirmation would be nice.

If it should output the predicted number of users per antenna, it should have probably the same number of neurons; so 80 it would be, just as in a multi-class classification scenario with a softmax activation function.

So what I need is a different activation function, but even after reading quite a bit, I couldn't wrap my head around it yet.

i.e. Get multiple output from Keras proposes to use a linear activation function, but in their case, they tried to predict the next 3 values, by using regression; whereas I am trying to predict the next 1 value for a set of antennas.

PS: For constructing the Neural Network, I'm using (Tensorflow-) Keras.

PPS: For feeding the neural network, I would generate the density vector for all time steps, and then feed batch-wise with batch_size = 80 (number of antennas). Out of curiosity: I happen to have only 1 feature, so the input_shape probably be (batch_size, 1, 1*80); If I was to have 2 features, would it then be (batch_size, 1, 2*80)?

PPPS: Not even quite sure how to name this problem. I think it would probably be called a (time-series) multiclass regression problem but I couldn't find any example with the same name (left aside the multinomial logistic regression).

$\endgroup$
1
$\begingroup$

If you want to predict the raw number of users, then this is a classical regression problem. Set an output layer with a node for each antenna, and no activation function.

If instead you need to predict a probability distribution / frequency on all antennas, use a softmax activation, so that each output vector would sum up to 1.

$\endgroup$
  • $\begingroup$ > no activation function. Could you elaborate on the motivation for that? Because in most readings, I found that linear activation functions are suggested $\endgroup$ – GrizZ Jun 26 at 9:26
  • 1
    $\begingroup$ No activation function means linear activation function. The nodes' inputs get multiplied by their respective weights and then there is no transformation at the output of the layer. No activation function = linear, additive effect of each node's output. $\endgroup$ – Leevo Jun 26 at 10:36
  • 1
    $\begingroup$ Okay, sorry for the inconvenience! It's just that I wanted to make sure, that I use the right activation function, also in terms of the default offered in Keras. But the default for Dense layer happens to be Linear, so thanks again :). $\endgroup$ – GrizZ Jun 26 at 23:36

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.