Skip to contents

This function computes auxiliary variables including monotonic measure (measure_monotonic), sparse measure (measure_sparse), splines measure (measure_splines), striped measure (measure_striped), and the number of observation (n). Scagnostics are computed using cassowaryr::sc_monotonic(), cassowaryr::sc_sparse2(), cassowaryr::sc_splines(), and cassowaryr::sc_striped().

If you wish to calculate additional auxiliary variables for your keras model, please override this method. Ensure that it accepts a data frame with columns named .fitted and .resid as input and returns a single row tibble.

Usage

AUTO_VI$auxiliary(data = seflf$get_fitted_and_resid())

Arguments

data

Data frame. A data frame containing variables .resid and .fitted. See also AUTO_VI$get_fitted_and_resid().

Value

A tibble.

Examples


my_vi <- auto_vi(fitted_model = lm(speed ~ dist, data = cars))
my_vi$auxiliary()
#> # A tibble: 1 × 5
#>   measure_monotonic measure_sparse measure_splines measure_striped     n
#>               <dbl>          <dbl>           <dbl>           <dbl> <int>
#> 1             0.154          0.523           0.176             0.6    50