Description Usage Arguments Details Value
Often, data must be adjusted (scaled, imputed, etc.) before it can be analysed. This method presents a simple and consistent interface for the same.
1 | pre_process(m, method = c("center", "scale"), ...)
|
m |
a feature matrix with samples in rows and features in columns. |
method |
list of preprocessing methods as defined in caret::preProcess,
centering and scaling it by default. See |
... |
preprocessing methods parameters as required by caret::preProcess |
Internally this is a wrapper of the equivalent methods from the caret package, that simplifies and streamlines usage. Note that while it suits our purposes to have a single step to adjust the data, caret package presents this as two steps - assess preprocessing and then carry it out. This is because you may need to calculate preprocessing over the training data and then transform the training & test data in the same way, or where you wish to explicitly capture the preprocessing stage (e.g. PCA).
the preprocessed data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.