The goal of rinfa is to provide Rust bindings for parsnip model specifications.
You can install the development version of rinfa from GitHub with:
# install.packages("devtools")
devtools::install_github("simonpcouch/rinfa")
x <- matrix(rnorm(3e7), ncol = 3)
y <- rnorm(1e7)
dat <- cbind(as.data.frame(x), y)
system.time(
lm(y ~ ., dat)
)
#> user system elapsed
#> 1.042 0.261 1.359
system.time(
# lm()'s speedy friend
lm.fit(x, y)
)
#> user system elapsed
#> 0.383 0.039 0.421
library(rinfa)
system.time({
.linfa_linear_reg(x, y)
})
#> user system elapsed
#> 0.175 0.078 0.255