predictEdge | R Documentation |
This function utilizes several data imputation methods in order to predict the existence of a link between two nodes by imputing the edges' weight in a weighted bipartite network of nominal data.
predictEdge(inc_mat, method = c("svd", "median", "als", "CA"))
inc_mat |
An incidence matrix containing missing values (edge weights), represented by NAs. |
method |
A string or list of string. By default, it is set to this list: |
This function performs a variety of numerical imputations according to the user's input, and returns a list of imputed data matrices based on each method separately, such as median
which replaces the missing values with the median of each rows (observations), and knn
which uses the k-Nearest Neighbour algorithm to impute missing values.
A list of matrices with original and imputed values by different methods.
knn.impute
,
softImpute
, imputeCA
,
imputeFAMD
, imputePCA
,
mice
.
# load part of the beatAML data
beatAML_data <- NIMAA::beatAML[1:10000,]
# convert to incidence matrix
beatAML_incidence_matrix <- nominalAsBinet(beatAML_data)
# predict the edges by imputation the weights
predictEdge(beatAML_incidence_matrix)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.