1
$\begingroup$

I need to build a neural network to predict predict outputs based on a set a input features, for a multi-channel system. Once I figure out this problem, I will implement it in Keras. Let me describe it in further detail:

I have a set of input variables ('temperature', 'current', 'voltage' ... )

the outputs are ('gainA', 'gainB', 'gainC', 'gainD')

However, each letter (A,B,C and D) represents a different channel, and the training data contains lots of different configurations of when the channel is ON/OFF. Therefore a typical training dataset would look like:

'ID' |  'Temperature'  | 'current' | 'voltage' | 'gainA' | 'gainB' | 'gainC' | 'gainD'
  1  |       23.1      |     2.1   |    5.1    |    0    |   1.5   |   3.1   |    1.2
  2  |       23.2      |     2.3   |    5.2    |    0    |   1.5   |   2.1   |    1.1
  3  |       23.4      |     2.0   |    5.0    |   1.3   |    0    |   1.7   |    1.0
  4  |       22.8      |     2.3   |    5.4    |   1.5   |   1.3   |   3.2   |     0              
  5  |       22.9      |     2.1   |    5.1    |    0    |    0    |    0    |    1.2
  6  |       23.2      |     2.2   |    5.3    |   1.2   |   1.5   |   3.4   |    1.3
...

As you can see from the dataset above, there is '0' for some gains. This is when the channel is OFF. There is only a non-zero value of gain when the channel is ON.

My model needs to be able to predict the gain of a channel if I were to switch it on

For example if we consider row 5 as the test data, I want to predict the numerical value of 'gainC' if I was to activate that channel

'ID' |  'Temperature'  | 'current' | 'voltage' | 'gainA' | 'gainB' | 'gainC' | 'gainD'
  5  |       22.9      |     2.1   |    5.1    |    0    |    0    |[predict this]|1.2

Initially, I considered training 4 models (one for each channel) however that would not work because the combination of gains are correlated and thus a multi-dimensional MLP is required.

If I used the 3 other gains as part of the input, it would just predict the gain to be 0 because that's what the model sees it to be.

Please could someone help me figure out a way of predicting the non-zero value of a gain. Perhaps part of the answer could include the binary representation of the channels. E.g

for ID number 5, the active channels are 0001 and we want to predict 0011

Maybe this could be part of the training data? Or an additional input to the predictor?

I'd appreciate some advice on how to approach this problem. (I'm fairly new to neural networks)

$\endgroup$

1 Answer 1

2
$\begingroup$

Have four neurons in your output layer, depicting gain $A, B, C, D$ and apply relu activation function throughout all your layers since it sets all negative values to $0$ and passes the rest.

Also you can use a simple mean squared error as your loss function. This setup will allow you to predict non-negative values, greater than $0$ for your gains, which is, what I believe, you require.

$\endgroup$
1

Your Answer

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

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