0
$\begingroup$

I am working through a machine learning book and am using the caret package in R. There is a function, preProcess, that uses resampling (intended for use on a training set I think) to estimate transformed values (e.g., log-transformation).

My questions are:

  1. Why would resampling be necessary? Why would you not just apply the transformation to your entire dataset?
  2. Why would you even need to estimate the transformed values? In my field, typically you would just apply whatever formula to your variables (e.g., calculate the log), and get newly-calculated variables that have undergone transformation.

My hunch is that this has something to do with computational efficiency, but am curious what the rationale for this procedure is.

$\endgroup$
3
  • 1
    $\begingroup$ I suspect that the resampling involves methods of estimating statistics (for example such as $p$-values) for the model by drawing information from the observations without making distributional assumptions; Jackknife and Bootstrap methods are examples of resampling. $\endgroup$
    – Henry
    Commented Oct 7, 2020 at 14:10
  • $\begingroup$ In this case, the resampling and estimation is applied to the raw data. That is, estimation in this case means predicting what e.g., the log-transformed values would be (rather than just applying the log to the values). I don't get why anyone would do that, but. I'm thinking there must be a reason since there's a popular function dedicated to doing it. $\endgroup$
    – mvanaman
    Commented Oct 7, 2020 at 14:34
  • 1
    $\begingroup$ Well, for one thing, the mean of a logarithm of data is not the logarithm of the mean of the data, as an example. Generally mean logarithm < logarithm of mean. $\endgroup$
    – Carl
    Commented Oct 17, 2020 at 0:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.