Closed MrWeijing closed 2 years ago
Determining iteration 0 (initial imputations) occurs here: https://github.com/AnotherSamWilson/miceforest/blob/master/miceforest/ImputationKernel.py#L448-L495
The easiest thing for you to do would be to edit this function in your own install. The nice thing about this function is that it is used to impute new data too, so whatever rules you create will also be used in impute_new_data
, if you plan on using it.
Thank you for your answer! I also want to ask two questions.
_initialize_dataset
is only called once per ImputationKernel, in __init__()
. However, that function will be called upon to initialize a new ImputedData
if you call impute_new_data
on a dataset. This should not affect the original kernel in any way, but if you edit the code, I can't make any guarantees.
Hello! Very useful project! I think proper initial imputation will improve the final imputation accuracy of the model, so I want to customize the initial imputation method. Now, I want to customize an initial imputation method, but I don't know how to modify the code. I hope to get some help and look forward to your reply.