At the symposium for Klaus Schubert I presented some ideas on pragmatism and machine learning.
Here are the slides:
And here come the R-codes:
Here are the slides:
And here come the R-codes:
# Truth is that which works.
# If it works, it works.
library(randomForest)
## randomForest 4.6-12
## Type rfNews() to see new features/changes/bug fixes.
x <- rnorm(25)
a <- 5
b <- 2
e <- rnorm(25,0,0.1)
y <- a+b*x+e
plot(x,y, main = "Ideal Data Generating Process")
fit <- lm(y~x)
abline(fit)
ind <- which(x<quantile(x)[2])
x[ind] <- x[ind] + rnorm(length(ind), 0, 10)
fit <- lm(y~x)
plot(x,y, ylim=c(min(c(y, predict(fit))), max(c(y, predict(fit)))), main = "Measurment Noise")
abline(fit)
points(x, predict(fit), col="red")
fit2 <- randomForest(y~x)
points(x, predict(fit2), col="green", pch = 19)
Kommentare
Kommentar veröffentlichen