impute.median: Median imputation for NA's'

Description Usage Arguments Details

Description

This function deals with NA for any object inherited by virtual class “SemiSupervised” by inputting the median of the non-missing values for each missing value.

Usage

1

Arguments

object

an R object for imputation of feature data for any “SemiSupervised” based objects.

...

ignored by this function.

Details

This function is primarily designed to be used with an SemiSupervised sub-object to filter missing values for the feature data. This is challenging since missing values in the response flag unlabeled cases. So missing data in the response is treated differently than missing data in the feature data. In order to do this, na.pass is forced as the na.action and cannot be changed. After an initial na.pass for the full data (response and feature) to handle missing values in the feature data, we force an additional execution of impute.median on the feature data only. In the case of formula y~., we do this prior to constructing the graph, and all these steps are internalized.

The na.action for the “SemiSupervised” based S4 generic functions is fixed for usage to na.pass and impute.median. So, any other imputation other than the median should be done outside the function directly on the data, and the response should not be imputed.


SemiSupervised documentation built on May 11, 2018, 5:03 p.m.