Pass a NAN in input vector for prediction
You cannot use NaN values because the input vector will, for instance, be multiplied with a weight matrix. The result of such operations needs to be defined.
What you typically do if you have gaps in your input data is, depending on the specific type and structure of the data, fill the gaps with "artificial" values. For instance, you can use the mean or median of the same column in the remaining training data instances.
I have a classifier that has been trained using a given set of input training data vectors. There are missing values in the training data which is filled as numpy.Nan values and Using imputers to fill in the missing values.
However, In case of my input vector for prediction, how do I pass in the input where the value is missing? should I pass the value as nan? Does imputer play a role in this.?
If I have to fill in the value manually, How do I fill in the value for such case will I need to calculate the mean/median/frequency from the existing data.
Note : I am using sklearn.