0
$\begingroup$

I have a dataset data that has missing values. I am trying two ways of imputing these values, but I would like to compare them.

In the first method I am using a combination of techniques. Some are filled with the mean, others with conditional mapping, and a couple with models fit to other features. I then call this imp_data.

In the second method I am putting in the original data and using sklearn's IterativeImputer in a pipeline.

Both methods will be used to fit a RandomForestClassifier of the same structure. If I use the same random_state in the splits of imp_data and data, will this give me a good comparison of imputation techniques? e.g. will

train_test_split(imp_data[inputs], imp_data[target], random_state=1)

and

train_test_split(data[inputs], data[target], random_state=1)

produce directly comparable results?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.