removeOutliers: removeOutliers

removeOutliersR Documentation

removeOutliers

Description

Remove identified outlier cell(s) from the dataset

Usage

removeOutliers(outlier_cells, hvt_results)

Arguments

outlier_cells

Vector. A vector with the cell number of the identified outliers

hvt_results

List. A list having the results of the compressed map i.e. output of HVT function

Details

This function is used to remove the identified outlier cell(s) from the dataset. It is recommended to run the HVT function before running this function. It takes input in the form of cell number of the outlier cell(s) identified using the output of the HVT function and the compressed map (hvt_mapA) generated using the HVT function. The output of this function is a list of two items: a new map having the data of removed outlier cell(s) and the subset of dataset without outliers.

Value

A list of two items: a map having the data of removed outlier cells and the subset of the dataset without outlier(s) which has to be passed as input argument to HVT function to generate another map

[[1]]

Dataframe. Information about the removed outlier cell(s)

[[2]]

Dataframe. Subset of dataset without the outlier cell(s)

Author(s)

Shantanu Vaidya <shantanu.vaidya@mu-sigma.com>

See Also

HVT
mlayerHVT

Examples

data(USArrests)
hvt_mapA <- list()
hvt_mapA <- HVT(USArrests, min_compression_perc = 70, quant.err = 0.2, 
                   distance_metric = "L1_Norm", error_metric = "mean",
                   projection.scale = 10, normalize = TRUE,
                   quant_method="kmeans")
plotHVT(hvt_mapA, line.width = c(0.8), color.vec = c('#141B41'), 
        maxDepth = 1)
        
identified_outlier_cells <- c(2, 10)
output_list <- removeOutliers(identified_outlier_cells, hvt_mapA)
hvt_mapB <- output_list[[1]]
dataset_without_outliers <- output_list[[2]]


muHVT documentation built on March 7, 2023, 6:38 p.m.