dai.transform.Rd
Computes the transformed features.
dai.transform( model, training_frame, validation_frame = NULL, testing_frame = NULL, validation_split_fraction = NULL, seed = NULL, fold_column = NULL, return_df = TRUE, progress = getOption("dai.progress", TRUE) )
model | The model to use for transformation. |
---|---|
training_frame |
|
validation_frame |
|
testing_frame |
|
validation_split_fraction | If not having validation dataset, split ratio for splitting training dataset. |
seed | Random seed for splitting. |
fold_column | Fold column used for splitting. |
return_df | Whether to return the transformed datasets as a list of |
progress | Whether to display a progress bar. |
A list of transformed datasets or file paths (see return_df
parameter).
The following datasets will be available upon successful completion:
Training dataset (not to be used for cross-validation)
Validation dataset for parameter tuning
Test dataset for final scoring. This option is available if a test dataset was used.
These datasets can be either obtained directly as list of data.frame
s
if (return_df=TRUE
), or a list of file paths that can be downloaded using
dai.download_file
.
dai.connect(uri = 'http://127.0.0.1:12345', username = 'h2oai', password = 'h2oai') iris_dai <- as.DAIFrame(iris, progress = FALSE) iris_splits <- dai.split_dataset(iris_dai, 'train', 'test', 0.8, progress = FALSE) model <- dai.train(training_frame = iris_splits$train, target_col = 'Species', is_classification = TRUE, is_timeseries = FALSE, time = 1, accuracy = 1, interpretability = 10, progress = FALSE) iris_trans <- dai.transform(model, training_frame = iris_splits$train, testing_frame = iris_splits$test, validation_split_fraction = .2) head(iris_trans$test)