# turn off parts of features in a neural network?

Suppose I have a neural network which accepts two sets of features as inputs and generates corresponding outputs, for instance, generate average final grade from: 1. working hours for N students in a class, 2. mid-term grade for N students in the same class. During training, the neural network is trained with many different classes. What I would like to during inference is to turn off one set of the features (i.e. feed only working hours as inputs) and predict outputs using the same neural network. Obviously, setting the mid-term grades to be all 0s would not be a good option. I wonder if anyone know what would be a good way to do this?

Thanks!

• Why not only train of the features available at test time? – kbrose May 25 '18 at 16:52

As far as I know, you cannot do that.
First :

Obviously setting the mid-term grades to be all 0s would be be a good option

No, actually that is a really bad option, neural networks do not understand magical parameters, meaning, if you put a 0 there it will think that the mid-term grades is 0, therefore it will probably give you a very low final grade prediction for you.

My advise, if you are very interested in doing that, create boolean factors, training inputs:

1. working_hours
• Sorry that was a typo, it should be Obviously setting the mid-term grades to be all 0s would not be a good option.... I just updated it in the text. If I set mid-term_grade_present to be 0, what should I use as inputs, specifically what should be the data for mid-term_grade part? If it is the same with mid-term_grade_present=1 case, then this boolean flag basically has no effect, if it is something else, what should it be? – username123 Mar 26 '18 at 15:23
• If I set mid-term_grade_present=0 I do not think mid_term_grade data would be ignored by the neural network since: 1. it is already included as part of inputs, 2. it is correlated with outputs. – username123 Mar 26 '18 at 15:41