If parameters of a model specification need to be modified, update() can be used in lieu of recreating the object from scratch.
# S3 method for nearest_neighbor_adaptive
update(
object,
parameters = NULL,
neighbors = NULL,
neighborhood = NULL,
matrix_diagonal = NULL,
weighted = NULL,
sphere = NULL,
num_comp = NULL,
fresh = FALSE,
...
)A model specification.
A 1-row tibble or named list with main parameters to update. Use either parameters or the main arguments directly when updating. If the main arguments are used, these will supersede the values in parameters. Also, using engine arguments in this object will result in an error.
The number of data points used for final classification.
The number of data points used to calculate between and within class covariance.
Diagonal elements of a diagonal matrix. 1 is the identity matrix.
weighted argument to ncoord. See fpc::ncoord() for details.
Only sub_dann engine.
One of "mcd", "mve", "classical", or "none" See fpc::ncoord()
for details. Only sub_dann engine.
Dimension of subspace used by dann. See fpc::ncoord() for
details. Only sub_dann engine.
A logical for whether the arguments should be modified in-place or replaced wholesale.
Not used for update().