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

unexpected warning with only one evaluation #34

Closed
sebffischer opened this issue Sep 19, 2023 · 3 comments
Closed

unexpected warning with only one evaluation #34

sebffischer opened this issue Sep 19, 2023 · 3 comments

Comments

@sebffischer
Copy link
Contributor

library(tf)
#> 
#> Attaching package: 'tf'
#> The following objects are masked from 'package:stats':
#> 
#>     sd, var
d = data.frame(time = 1, value = 2, id = "1")

x = tf::tfd(d, arg = "time", value = "value", id = "id")
#> Warning in min(diff(.x)): no non-missing arguments to min; returning Inf

Created on 2023-09-19 with reprex v2.0.2

@fabian-s
Copy link
Contributor

fabian-s commented Jan 8, 2024

not sure what to do here- makes sense to me that things start to break for "functions" with 1 evaluation?
what would be the desired/optimal behavior here?

@sebffischer
Copy link
Contributor Author

From a practical perspective, these things can happen in real world datasets, so handling the case would be more convenient for users. I am not familiar enough with the internals, but I guess the interpolation / extrapolation methods could just predict the constant that is observed?

@jeff-goldsmith
Copy link
Contributor

you could also predict FPC scores from a single data point -- and "functions" with one observation sometimes come up when you have really sparse data ...

@fabian-s fabian-s added this to the put it on CRAN milestone Feb 27, 2024
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

3 participants