Question: Hi, I am getting the below error while performing kNN imputation . The code used is this . Would you please help me solve this

Hi,

I am getting the below error while performing kNN imputation . The code used is this . Would you please help me solve this ?

raw_data2 <- knnImputation(raw_data1[,!names(raw_data1)%in%"medv"])

Error: Positive column indexes in `[` must match number of columns:

* `.data` has 1 columns

* Position 1 equals 102

* Position 2 equals 155

* Position 3 equals 711

* Position 4 equals 1085

* ... and 6 more problems

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!