Description Usage Arguments Value Examples
View source: R/composition-function.R
This function get table of estimated weights to transform the input to
output dimensions by rsdr()
function.
1 | composition(rsdr_object, dimensions = NULL)
|
rsdr_object |
RSDR object, a list of results and parameters. This is
an output from |
dimensions |
Dimension index, a vector of integers for the column
indices of the table, indicating the output dimensions transformed by
|
RSDR object, a list of results and parameters. Use plot()
to
visualize weights that are used to transformed all input dimension to each
output dimension.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ## Create input example
library(medhist)
data(medhistdata)
ps_remover=extract_nps_mh(medhistdata)
mh_bin_nps=
medhistdata[ps_remover_train$key,] %>%
`exprs<-`(
exprs(.) %>%
t() %>%
as.data.frame() %>%
rownames_to_column(var='id') %>%
column_to_rownames(var='id') %>%
t()
) %>%
trans_binary(verbose=F)
input=
mh_bin_nps %>%
exprs() %>%
t() %>%
as.data.frame()
## Fit dimensional reduction models with resampling
rsdr_bin_nps=rsdr(input,'CV',10,'PCA')
## Get table of estimated weights of transformation
composition(rsdr_bin_nps)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.