Description Usage Arguments Value Examples
View source: R/transformation-function.R
This function transforms input dimensions using a re-sampled dimensional
reduction model fitted by rsdr()
.
1 2 3 4 5 6 7 8 9 | transformation(
tidy_set,
rsdr_object,
dimensions = NULL,
input_dim = NULL,
top_n = NULL,
output_dim = NULL,
verbose = T
)
|
tidy_set |
A TidySet (i.e. ExpressionSet) containing the visits of
subjects in outcome dataset, paid by any payment systems. This TidySet also
accomodates outcome dataset. This is an output of
|
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
|
input_dim |
Input dimension, a vector of characters containing the names of input dimensions that are selected to transform into output dimensions. |
output_dim |
Output dimension, a vector of characters containing the names of output dimensions that are selected after transformation. |
verbose |
Verbosity, a logical indicating whether progress should be shown. |
A TidySet (i.e. ExpressionSet) containing the transformed table
accessed using exprs()
function from Biobase package. Composition of
input dimensions as a weight table can be accessed using fData()
from
the same package. RSDR models and proportion of variance explained (PVE)
using input_dim
and output_dim
can be accessed using
preproc()
.
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 29 30 31 32 33 34 35 | ## 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')
## Transform dimensions using an RSDR model
dr_bin_nps=
mh_bin_nps %>%
transformation(
rsdr_object=rsdr_bin_nps
,input_dim=rownames(mh_bin_nps)
,top_n=6
,verbose=F
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.