Skip to contents

Add a single point to an online LOWESS model

Usage

add_point(model, ...)

# S3 method for class 'OnlineLowess'
add_point(model, x, y, ...)

Arguments

model

An OnlineLowess object.

...

Must be empty.

x

A single numeric x value.

y

A single numeric y value.

Value

An online result list, or NULL if fewer than min_points have been added.

Examples

model <- OnlineLowess(fraction = 0.2, window_capacity = 20L, min_points = 2L)
invisible(add_point(model, 1.0, 0.5))
add_point(model, 2.0, 0.6)
#> $y
#> [1] 0.6
#> 
#> $residual
#> [1] 0
#> 
#> $robustness_weight
#> [1] 1
#> 
#> $iterations_used
#> [1] 0
#>