calibrate_r2: Quantitative r2 calibration for Opn objects

calibrate_r2R Documentation

Quantitative r2 calibration for Opn objects

Description

Estimates the r2 to calibrate the degree for npoly and opoly methods. Also returns a plot

Usage

calibrate_r2()

calibrate_r2_opoly(
  Opn,
  id = 1:length(Opn),
  degree.range = 1:8,
  thresh = c(0.9, 0.95, 0.99, 0.999),
  plot = TRUE,
  ...
)

calibrate_r2_npoly(
  Opn,
  id = 1:length(Opn),
  degree.range = 1:8,
  thresh = c(0.9, 0.95, 0.99, 0.999),
  plot = TRUE,
  ...
)

Arguments

Opn

an Opn object

id

the ids of shapes on which to calculate r2 (all by default)

degree.range

on which to calculate r2

thresh

the threshold to return diagnostic

plot

logical whether to print the plot

...

useless here

Details

May be long, so you can estimate it on a sample either with id here, or one of sample_n or sample_frac

Value

a ggpot2 object

Note

Silent message and progress bars (if any) with options("verbose"=FALSE).

See Also

Other calibration: calibrate_deviations(), calibrate_harmonicpower(), calibrate_reconstructions

Examples

olea %>% slice(1:5) %>% #for the sake of spped
    calibrate_r2_opoly(degree.range=1:5, thresh=c(0.9, 0.99))

olea %>% slice(1:5) %>% #for the sake of spped
    calibrate_r2_npoly(degree.range=1:5, thresh=c(0.9, 0.99))


vbonhomme/Momocs documentation built on Nov. 13, 2023, 8:54 p.m.