AUTO_VI$lineup_check {autovi}R Documentation

Conduct a auto visual inference lineup check with a computer vision model

Description

This function conducts a visual inference lineup check with a computer vision model. The result will be stored in self$check_result.

Usage

AUTO_VI$lineup_check(
  lineup_size = 20L,
  fitted_model = self$fitted_model,
  keras_model = self$keras_model,
  null_method = self$null_method,
  data = self$get_data(),
  node_index = self$node_index,
  extract_feature_from_layer = NULL
)

Arguments

lineup_size

Integer. Number of plots in a lineup.

fitted_model

Model. A model object, e.g. lm.

keras_model

Keras model. A trained computer vision model.

null_method

Function. A method to simulate residuals from the null hypothesis distribution. For lm, the recommended method is residual rotation AUTO_VI$rotate_resid().

data

Data frame. The data used to fit the model. See also AUTO_VI$get_data().

node_index

Integer. An index indicating which node of the output layer contains the visual signal strength. This is particularly useful when the keras model has more than one output nodes.

extract_feature_from_layer

Character/Integer. A layer name or an integer layer index for extracting features from a layer.

Value

Return the object itself.

Examples

keras_model <- try(get_keras_model("vss_phn_32"))
if (!inherits(keras_model, "try-error")) {
  myvi <- auto_vi(lm(dist ~ speed, data = cars), keras_model)

  myvi$lineup_check()
  myvi
}


[Package autovi version 0.4.0 Index]