
Strip embedded training data from a fitted Cubist model
Source:R/cubist_baseline.R
dot-strip_cubist_data.RdCubist::cubist() keeps a verbatim copy of the whole training matrix
(all predictor columns plus the response) in $data, as a CSV text
blob. Because we train on PCA scores of OSSL spectra, that blob would let
anyone reconstruct the OSSL spectra (via .reconstruct_pca()) and read
the OSSL lab values straight out of a published model file — i.e. it would
turn our model archive into an unlicensed redistribution of the OSSL
database. It is also pure dead weight: predictions are bit-identical
without it.
Arguments
- mdl
A model returned by
Cubist::cubist()