update.nearest_neighbor_adaptive {tidydann}R Documentation

Updating a model specification.

Description

If parameters of a model specification need to be modified, update() can be used in lieu of recreating the object from scratch.

Usage

## S3 method for class 'nearest_neighbor_adaptive'
update(
  object,
  parameters = NULL,
  neighbors = NULL,
  neighborhood = NULL,
  matrix_diagonal = NULL,
  weighted = NULL,
  sphere = NULL,
  num_comp = NULL,
  fresh = FALSE,
  ...
)

Arguments

object

A model specification.

parameters

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.

neighbors

The number of data points used for final classification.

neighborhood

The number of data points used to calculate between and within class covariance.

matrix_diagonal

Diagonal elements of a diagonal matrix. 1 is the identity matrix.

weighted

weighted argument to ncoord. See fpc::ncoord() for details. Only sub_dann engine.

sphere

One of "mcd", "mve", "classical", or "none" See fpc::ncoord() for details. Only sub_dann engine.

num_comp

Dimension of subspace used by dann. See fpc::ncoord() for details. Only sub_dann engine.

fresh

A logical for whether the arguments should be modified in-place or replaced wholesale.

...

Not used for update().


[Package tidydann version 1.0.0 Index]