-
Notifications
You must be signed in to change notification settings - Fork 106
Adding null model #126
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
Adding null model #126
Conversation
|
Please use @DavisVaughan will get a laugh out at this coming from me but please lint the R code. Opening brackets should be on the same line as the function definition/ null_model.default <- function(x = NULL, y, ...) {
}Can you also enable multivariate numeric regression? |
iris_basic <- null_model(mode = "regression") %>%
set_engine("parsnip") %>%
fit(cbind(Sepal.Width) ~ ., data = iris)
predict_numeric(iris_basic, iris[1:5,])
iris_basic <- null_model(mode = "regression") %>%
set_engine("parsnip") %>%
fit(cbind(Sepal.Width, Petal.Width) ~ ., data = iris)
predict_numeric(iris_basic, iris[1:5,])
Consider it done! library(parsnip)
iris_basic <- null_model(mode = "regression") %>%
set_engine("parsnip") %>%
fit(cbind(Sepal.Width) ~ ., data = iris)
predict_numeric(iris_basic, iris[1:5,])
#> [1] 3.057333 3.057333 3.057333 3.057333 3.057333
iris_basic <- null_model(mode = "regression") %>%
set_engine("parsnip") %>%
fit(cbind(Sepal.Width, Petal.Width) ~ ., data = iris)
predict_numeric(iris_basic, iris[1:5,])
#> Sepal.Width Petal.Width
#> 1 3.057333 1.199333
#> 2 3.057333 1.199333
#> 3 3.057333 1.199333
#> 4 3.057333 1.199333
#> 5 3.057333 1.199333Created on 2019-01-25 by the reprex package (v0.2.1) While we are at it, should we also add |
|
|
|
Should be there now. |
|
Thanks! |
|
This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue. |
in reference to #122.
Still WIP. Most of the skeleton is there but the
predict()outputs length of fitting data notnew_data.