There are multiple resources and answers on type of imputations and packages that can help in imputing the missing values or how to use a particular package. But there are little to no resources available on how to impute a dataset. On searching, one can find threads related to this question, but don't exactly answer them.
When should imputation take place? Let's say there is a dataset which is split into train and validation set. Should imputation take place before splitting the dataset or after splitting on training dataset? If on training dataset, how should validation split be imputed?
Follow up question. Let's say we are using KNN to impute the dataset. If I build an application that takes in a datapoint, I would need to impute the missing values in that datapoint before running predictions on it. Since KNN looks for closest rows, I feel I should add this datapoint to my imputed dataset on which prediction model was developed, run KNN again on it, get imputed datapoint and then run predictions on it. Is this correct way to do it? Would this process change for other imputation methods, like BPCA?