powered by
Returns a vector of distances from all rows in vR to the single row uR using ciR as the inverted covariance matrix.
ruler(vR, uR, ciR)
a vector of length k containing a list of values for all features (k) for the target. Numeric and dense.
an n x k matrix containing a matrix of values for all features (k) for all candidates (n). Numeric and dense.
a square k x k matrix containing the inverted covariance matrix for all features (k). Numeric and dense.
# NOT RUN { set.seed(123) df <- data.frame(x = rpois(10, 20), y = rnorm(10, 50, 10)) cov_inv <- MASS::ginv(cov(df)) mmsample::ruler(as.matrix(df[2:10, ]), as.numeric(df[1, ]), cov_inv) # }
Run the code above in your browser using DataLab