Skip to contents

Returns timing and output-size measurements across a set of sample sizes, so the scaling relationship between input size and computational cost can be inspected and tested (RE5.0).

Usage

morie_lm_scaling(formula, data, sizes)

Arguments

formula

A model formula.

data

A data.frame to subsample from.

sizes

Integer vector of row counts to time.

Value

A data.frame with n, seconds, and n_coef.

Examples

morie_lm_scaling(mpg ~ hp + wt, mtcars, sizes = c(10, 20, 32))
#>    n seconds n_coef
#> 1 10   0.002      3
#> 2 20   0.002      3
#> 3 32   0.002      3