An R6 class that performs pairwise correlation of the features of the original and the imputed data set. The correlation results of both data sets are compared by subtraction.
R6::R6Class object.
x <- pguIMP::pgu.corrValidator$new()
featureNamesReturns the instance variable featureNames. (character)
orgR_matReturns the instance variable orgR_mat. (matrix)
impR_matReturns the instance variable impR_mat. (matrix)
orgP_matReturns the instance variable orgP_mat. (matrix)
impP_matReturns the instance variable impP_mat. (matrix)
corr_dfReturns the instance variable corr_df. (tibble::tibble)
summary_dfReturns the instance variable summary_df. (tibble::tibble)
new()Clears the heap and
indicates if instance of pgu.corrValidator is removed from heap.
Summary of the correlation deviation distribution.
Creates a square matrix which dimension corresponds to the length
of the instance variable featureNames. The matrix entries are set to a distinct value.
Flattens the results transforms them into a dataframe and stores it into the instance variable corr_df.
Creates and returns a new pgu.corrValidator object.
pgu.corrValidator$new(org_df = "tbl_df", imp_df = "tbl_df")
org_dfThe original data to be analyzed. (tibble::tibble)
imp_dfThe imputed version of the org_df data.
A new pgu.corrValidator object.
(pguIMP::pgu.corrValidator)
print()Prints instance variables of a pgu.corrValidator object.
pgu.corrValidator$print()
string
reset()Resets the object pgu.corrValidator based on the instance variable featureNames..
pgu.corrValidator$reset()
fit()Runs the corraltion analysis.
pgu.corrValidator$fit(org_df = "tbl_df", imp_df = "tbl_df")
org_dfAdataframe comprising the original data. (tibble::tibble)
imp_dfAdataframe comprising the imputed data. (tibble::tibble)
correlationScatterPlot()Plots the correlation analysis results.
pgu.corrValidator$correlationScatterPlot()
correlationBarPlot()Creates and returns a histogram from the cor_delat values.
pgu.corrValidator$correlationBarPlot()
Bar plot (ggplot2::ggplot)
correlationBoxPlot()Plots the correlation analysis results.
pgu.corrValidator$correlationBoxPlot()
correlationCompoundPlot()Creates and returns a compund graphical analysis of the cor_delta values.
pgu.corrValidator$correlationCompoundPlot()
Compound plot (gridExtra::grid.arrange)
clone()The objects of this class are cloneable with this method.
pgu.corrValidator$clone(deep = FALSE)
deepWhether to make a deep clone.
# NOT RUN {
require(dplyr)
require(tibble)
data(iris)
data_df <- iris %>%
tibble::as_tibble()
comp_df <- data_df %>%
dplyr::mutate(Sepal.Length = sample(Sepal.Length))
corr_obj = pguIMP::pgu.corrValidator$new()
corr_obj$fit(data_df, comp_df)
print(corr_obj)
# }
Run the code above in your browser using DataLab