createPreprocessorFromJson: Reload a covariate preprocessor object from a JSON string...

View source: R/utils.R

createPreprocessorFromJsonR Documentation

Reload a covariate preprocessor object from a JSON string containing a serialized preprocessor

Description

Reload a covariate preprocessor object from a JSON string containing a serialized preprocessor

Usage

createPreprocessorFromJson(json_object)

Arguments

json_object

in-memory wrapper around JSON C++ object containing covariate preprocessor metadata

Value

Preprocessor object that can be used with the preprocessPredictionData function

Examples

cov_mat <- matrix(1:12, ncol = 3)
preprocess_list <- preprocessTrainData(cov_mat)
preprocessor_json <- convertPreprocessorToJson(preprocess_list$metadata)
preprocessor_roundtrip <- createPreprocessorFromJson(preprocessor_json)

stochtree documentation built on April 4, 2025, 2:11 a.m.