MissingPred: Prediction with Missing Values

Prediction with Missing ValuesR Documentation

Prediction with Missing Values

Description

ML methods for prediction in which features are subject to missing values.

Usage

qeLinMV(data,yName)
qeLogitMV(data,yName,yesYVal)
qeKNNMV(data,yName,kmax)
## S3 method for class 'qeLinMV'
predict(object,newx,...)
## S3 method for class 'qeLogitMV'
predict(object,newx,...)
## S3 method for class 'qeKNNMV'
predict(object,newx,...)

Arguments

...

Further arguments.

object

An object returned by one of the qe*MV functions.

data

Dataframe, training set. Classification case is signaled via labels column being an R factor.

yName

Name of the class labels column.

newx

New data to be predicted.

kmax

Number of nearest neighbors in training set.

yesYVal

Y value to be considered "yes," to be coded 1 rather than 0.

Details

These are wrappers to the toweranNA package. Linear, logistic and kNN interfaces are available.

Author(s)

Norm Matloff

Examples


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


matloff/qeML documentation built on Dec. 15, 2024, 10:15 a.m.