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

Convert null_model to be simply NULL #234

Open
mitchelloharawild opened this issue Jun 25, 2020 · 3 comments
Open

Convert null_model to be simply NULL #234

mitchelloharawild opened this issue Jun 25, 2020 · 3 comments

Comments

@mitchelloharawild
Copy link
Member

There are many cases in which NULL can be generated from other tidyverse tools.
Handling NULL models should be handled with the simpler NULL value.

@edgBR
Copy link

edgBR commented Jul 2, 2020

This will be a very nice feature.

It will be much easier to clean the mable.

BR
/E

mitchelloharawild added a commit that referenced this issue Jul 10, 2020
@mitchelloharawild
Copy link
Member Author

This is slightly challenging as currently the NULL model stores its own response variables for formatting fitted()/residuals() output. As a mable can only contain a single response variable, this metadata should be brought up to the mable level and not be stored within models.

@mitchelloharawild mitchelloharawild added this to the v0.2.2 milestone Jan 4, 2021
@mitchelloharawild
Copy link
Member Author

MRE:

library(fable)
#> Loading required package: fabletools
library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
lung_deaths <- as_tsibble(cbind(mdeaths, fdeaths))
mbl <- lung_deaths %>% model(a = TSLM(value ~ season()), b = SNAIVE(value))
bind_rows(mbl %>% slice(1), mbl %>% slice(2) %>% select(a))
#> Error in UseMethod("response_vars"): no applicable method for 'response_vars' applied to an object of class "NULL"

Created on 2021-01-08 by the reprex package (v0.3.0)

@mitchelloharawild mitchelloharawild removed this from the v0.3.0 milestone Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants