Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Predictions are not smooth #61

Closed
andreasnoack opened this issue Mar 16, 2023 · 2 comments · Fixed by #63
Closed

Predictions are not smooth #61

andreasnoack opened this issue Mar 16, 2023 · 2 comments · Fixed by #63
Labels

Comments

@andreasnoack
Copy link
Member

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

@bjarthur
Copy link
Contributor

closed by #63 ?

@andreasnoack
Copy link
Member Author

closed by #63 ?

Yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants