pca_central_element | R Documentation |
Calculates maximum total euclidean distance from each element to all other elements through as many principle components as necessary based on the method indicated.
pca_central_element(
pca_data,
elements,
max_depth = ncol(pca_data) - 1,
centrality_method = "max-depth"
)
pca_data |
Data.frame or matrix of pca loadings ( elements x principle components ) |
elements |
Character vector of the set of elements from which to determine centrality. Values must be a subset of pca_data rownames. |
max_depth |
An integer indicating the maximum number of Principle Components to use in determining most central element |
centrality_method |
A one-length character vector with value "two-in-a-row", "max-depth" or "first-most-frequent". "two-in-a-row" selects whichever feature shows up two times in a row as you compare more and more pc's. So if you get feature a when including only pc1-pc2 , feature b for pc1-pc3, and feature b for pc1-pc4, it would return feature b. "first-most-frequent" returns whichever feature shows up the most times as you compare each number of PC's. "First" because if different features each show up the same number of times whichever showed up with the fewest pc's is returned. |
Returns the element name that is most central based on minimum euclidean distance through n principle components.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.