Description Usage Arguments Value
View source: R/MakeTrainTest.R
This function can arrange the data (Move the outcome to the left),
standardize the training data and test data
using training data's information.
You can also choose whether you transform the outcome
with Box-Cox transformation or not.
If you transform the outcome, it also returns
mean value outcome_mean
, standard deviation outcome_sd
and Box-Cox transformation parameter lambda
1 2 3 4 5 6 7 8 | MakeTrainTest(
outcome_name,
features_index,
data_train,
data_test,
y_method = FALSE,
boxcox = FALSE
)
|
outcome_name |
The outcome's name (Strings) |
features_index |
The index of columns you use as features |
data_train |
Training data |
data_test |
Test data |
y_method |
Decide how outcome will be standardized.
|
boxcox |
If |
A list that has scaled data and separate data in features and outcome as matrix.
train |
Standardized training data |
test |
Standardized test data |
train_x |
Drop outcome from |
train_y |
outcome of training data
(if |
test_x |
Drop outcome from |
test_y |
Outcome of test data (not changed) |
outcome_mean |
A value used for centering outcome (mean of outcome in training data) |
outcome_sd |
A value used for scaling outcome (standard deviation of outcome in test data) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.