Thomas
Thomas

Reputation: 1219

Imputation mixed data caret (preProcess)

I am trying to impute data before modeling with random forest for example.

I have categorical and continuous features. I would like to use the function kNN (VIM package) to impute my data. But I can't use this function in the preProcess function of caret and the knn imputation of this function does not handle mixed data.

How can I impute mixed data in the preProcess function ?

Upvotes: 0

Views: 1492

Answers (1)

topepo
topepo

Reputation: 14331

As of right now, it will only impute continuous predictors (which you can get via dummy variables).

You could write your won custom method to use that function for pre-processing if you like. This example might help.

Once I get through the work for my day job, improving preProcess is the next major task for package development.

Thanks,

Max

Upvotes: 1

Related Questions