Learn R Programming

datanugget (version 1.4.0)

getDN.means: Calculates the means of a given Data Nugget

Description

This function calculates the datanugget means of a given datanugget object.

Usage

getDN.means(x, 
            DN)

Value

out

nrow(DN$'Data Nuggets') by ncol(x) data frame containing the means of the data nuggets.

Arguments

x

A data matrix (of class matrix, data.frame, or data.table) containing only entries of class numeric.

DN

A datanugget object created using the create.DN or refined using the refine.DN function.

Author

Rituparna Dey, Traymon Beavers, Javier Cabrera, Mariusz Lubomirski

Details

create.DN function generates Data nuggets with centers based on different centering methods viz., mean, random and original. For any datanugget object created by create.DN or refined by refine.DN, this function computes the means of the datanuggets.

References

Beavers, T. E., Cheng, G., Duan, Y., Cabrera, J., Lubomirski, M., Amaratunga, D., & Teigler, J. E. (2024). Data Nuggets: A Method for Reducing Big Data While Preserving Data Structure. Journal of Computational and Graphical Statistics, 1-21.

Cherasia, K. E., Cabrera, J., Fernholz, L. T., & Fernholz, R. (2022). Data Nuggets in Supervised Learning. In Robust and Multivariate Statistical Methods: Festschrift in Honor of David E. Tyler (pp. 429-449). Cham: Springer International Publishing.

Examples

Run this code
      
      set.seed(55)
      X = cbind.data.frame(rnorm(10^3),
                           rnorm(10^3),
                           rnorm(10^3))
      
      
      # with center.method = "original"
      my.DN = create.DN(x = X,
                        R = 500,
                        delete.percent = .1,
                        DN.num1 = 500,
                        DN.num2 = 250,
                        no.cores = 0,
                        make.pbs = FALSE)

      

      my.DN.means = getDN.means(x = X, 
                                DN = my.DN)
      my.DN.means

Run the code above in your browser using DataLab