Skip to content

Predictions are not smooth #61

@andreasnoack

Description

@andreasnoack

I'd say that the purpose of LOESS is to provide smooth predictions but that is not the case with the current implementation. Compare the LOESS lines produced by this package to the one from R. The tuning parameters should be identical.

Loess.jl:

julia> using Loess, CairoMakie

julia> lf = loess(df.x, df.y);

julia> f, ax, l1 = scatter(df.x, df.y);

julia> lines!(ax, px, Loess.predict(lf, px), color=:black);

julia> f

Skærmbillede 2023-03-16 kl  09 24 28

R:

> df <- read.csv("/Users/andreasnoack/Downloads/loessdf.csv")
> plot(y ~ x, df)
> lf <- loess(y ~ x, df)
> lines(px, predict(lf, px))

Skærmbillede 2023-03-16 kl  10 16 57

Data

loessdf.csv

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions