Adds a single tree fit to the full (non-subsampled) data passed here. Must have the same columns as previously-fitted data.
add.isolation.tree(model, df, sample_weights = NULL, column_weights = NULL)
An Isolation Forest object as returned by isolation.forest, to which an additional tree will be added.
This object will be modified in-place.
A `data.frame`, `data.table`, `tibble`, `matrix`, or sparse matrix (from package `Matrix` or `SparseM`, CSC format) to which to fit the new tree.
Sample observation weights for each row of 'X', with higher weights indicating distribution density (i.e. if the weight is two, it has the same effect of including the same data point twice). If not `NULL`, model must have been built with `weights_as_sample_prob` = `FALSE`.
Sampling weights for each column in `df`. Ignored when picking columns by deterministic criterion. If passing `NULL`, each column will have a uniform weight. Cannot be used when weighting by kurtosis.
The same `model` object now modified, as invisible.
Be aware that, if something goes wrong in the process (such as running out of RAM or receiving an interrupt signal), the `model` object that was passed here might be rendered unusable.
For safety purposes, the model object can be deep copied (including the underlying C++ object) through function deepcopy.isotree before undergoing an in-place modification like this.