powered by
ML methods for prediction in which features are subject to missing values.
qeLinMV(data,yName) qeLogitMV(data,yName,yesYVal) qeKNNMV(data,yName,kmax) # S3 method for qeLinMV predict(object,newx,...) # S3 method for qeLogitMV predict(object,newx,...) # S3 method for qeKNNMV predict(object,newx,...)
Further arguments.
An object returned by one of the qe*MV functions.
qe*MV
Dataframe, training set. Classification case is signaled via labels column being an R factor.
Name of the class labels column.
New data to be predicted.
Number of nearest neighbors in training set.
Y value to be considered "yes," to be coded 1 rather than 0.
Norm Matloff
These are wrappers to the toweranNA package. Linear, logistic and kNN interfaces are available.
sum(is.na(airquality)) # 44 NAs, good test example z <- qeKNNMV(airquality,'Ozone',10) # example of new case, insert an NA in 1st row aq2 <- airquality[2,-1] aq2$Wind <- NA predict(z,aq2) # 28.1
Run the code above in your browser using DataLab