ssr_predict | R Documentation |
Calculates the prediction for a given SSR model.
ssr_predict(df, xx)
df |
dataframe containing two series with x- und y-values. |
xx |
array containung locations for predictions. |
yy |
array containung the predicted values. |
Dr. Lars Metzner
Dr. Lars Metzner (2021) Adäquates Maschinelles Lernen. Independently Published.
set.seed(1234)
df <- data.frame(x=runif(500, min=-1, max=1)*pi)
df$y <- sin(df$x)*20 + rnorm(nrow(df), mean=0, sd=10)
plot(df, xlim=c(-4, 4))
dfl1 <- ssr(df)
lines(dfl1)
xx <- c(-4, -1, 0, 1, 4)
yy <- ssr_predict(dfl1, xx)
points(xx,yy, pch='+', col='red', cex=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.