Releases: tidyverts/fabletools
Releases · tidyverts/fabletools
CRAN v0.4.1
CRAN v0.4.0
Improvements
- Improved handling of
combination_model()
when used with transformed
component models. autoplot(<fbl_ts>)
,autolayer(<fbl_ts>)
andautoplot(<dcmp_ts>)
now use
the ggdist package visualising uncertainty with distributional vectors.
CRAN v0.3.4
fabletools 0.3.4
New features
- The formula parser now identifies and stores length 1 values in the
transformation environment. This simplifies common tasks like automatic
box-cox parameters for each series, which can now be done with
fable::ARIMA(box_cox(y, feasts::guerrero(y)))
.
Improvements
- Added support for visualising different point forecasts (say means and medians)
when only one forecast is to be plotted for each series.
Bug fixes
CRAN v0.3.3
fabletools 0.3.3
Improvements
- Fixed handling of transformed distributions which accept a parameter from the
dataset. .
in a model formula forxreg
implemented withspecial_xreg()
will now
include all measured variables (excluding the index and key variables).- Improved handling of transformations with forecast sample distributions.
- Added support for reconciling sample paths.
accuracy(<fbl_ts>)
can now summarise accuracy over key variables. This is
done by specifying the accuracyby
argument and not including some (or all)
of the fable's key variables (#341).- Like
forecast()
,generate()
will now keep exogenous regressors in the
output table. - Re-export
generics::forecast()
for better compatibility with registering
methods alongside other packages (#375).
CRAN v0.3.2
fabletools 0.3.2
New features
- Added
hypothesize()
generic for running statistical tests on a trained model. - Added
combination_weighted()
function for producing a combination model with
arbitrary weights.
Improvements
- The fallback residuals() method now handles transformations when
type = "innovation"
. - Improved supported expressions for producing combination models. The
appropriate response variable is now simplified for all functions that produce
that original response variable. This notably includes0.7*mdl1 + 0.3*mdl2
-
ifmdl1
andmdl2
are models with the same response variables, then the
resulting combination model will also have the same response variable. - Documentation improvements.
Bug fixes
- Fixed issue with exogenous regressors (
xreg
) in reconciliation methods that
partially forecast the hierarchy. - Fixed issue with keys being dropped when several
mdl_df
(mable) objects were
combined.
CRAN v0.3.1
New features
- Added
outliers()
generic for identifying the outliers of a fitted model. - Added
special_xreg()
special generator, for producing a model matrix of
exogenous regressors. It supports an argument for controlling the default
inclusion of an intercept. - Migrated
common_xregs
helper from fable to fabletools for providing a
common and consistent interface for common time series exogenous regressors. - Added experimental support for passing the tsibble index to
features()
functions if the.index
argument is used in the function.
Improvements
- Added transformation support for fallback
fitted(h > 1)
method (#302). - Documentation improvements.
CRAN v0.3.0
New features
- Added
scenarios()
function for providing multiple scenarios to the
new_data
argument. This allows different sets of future exogenous regressors
to be provided to functions likeforecast()
,generate()
, and
interpolate()
(#110). - Added
quantile_score()
, which is similar topercentile_score()
except it
allows a set of quantileprobs
to be provided (#280). - Added distribution support for
autoplot(<dable>)
. If the decomposition
provides distributions for its components, then the uncertainty of the
components will be plotted with interval ribbons. - Added block bootstrap option for bootstrapping innovations in
generate()
. - Added multiple step ahead fitted values support via
fitted(<mable>, h > 1)
. - Added
as_fable(<forecast>)
for converting olderforecast
class objects to
fable
data structures. - Added
top_down(method = "forecast_proportion")
for reconciliation using the
forecast proportions techniques. - Added
middle_out()
forecast reconciliation method. - Added directional accuracy measures, including
MDA()
,MDV()
andMDPV()
(#273, @davidtedfordholt). - Added
fill_gaps(<fable>)
.
Improvements
- The
pinball_loss()
andpercentile_score()
accuracy measures are now scaled
up by 2x for improved meaning. The loss at 50% equals absolute error and the
average loss equals CRPS (#280). - Automatic transformation functions formals are now named after the response
variable and not converted to.x
, preventing conflicts with values named.x
. box_cox()
andinv_box_cox()
are now vectorised over the transformation
parameterlambda
.RMSSE()
accuracy measure is now included in defaultaccuracy()
measures.- Specifying a different
response
variable inas_fable()
will no longer
error, it now sets the providedresponse
value as the distribution's new
response. - Minor vctrs support improvements.
Bug fixes
- Data lines in fable
autoplot()
are now always grouped by the data's key. - Fixed
bottom_up()
aggregation mismatch for redundant leaf nodes (#266). - Fixed
min_trace()
reconciliation for degenerate hierarchies (#267). - Fixed
select(<mable>)
not keeping required key variables (#297). - Fixed
...
not being passed through inreport()
.
CRAN v0.2.1
New features
- Added
bottom_up()
forecast reconciliation method. - Added the
skill_score()
accuracy measure modifier. - Added
agg_vec()
for manually producing aggregation vectors.
Improvements
- Fixed some inconsistencies in key ordering of model accessors (such as
augment()
,tidy()
andglance()
) with model methods (such asforecast()
andgenerate()
). - Improved equality comparison of
agg_vec
classes, aggregated values will now
always match regardless of the value used. - Using
summarise()
with a fable will now retain the fable class if the
distribution still exists under the same variable name. - Added
as_fable.forecast()
to convert forecast objects from the forecast
package to work with fable. - Improved
CRPS()
performance when using sampling distributions (#240). - Reconciliation now works with hierarchies containing aggregate leaf nodes,
allowing unbalanced hierarchies to be reconciled. - Produce unique names for unnamed features used with
features()
(#258). - Documentation improvements
- Performance improvements, including using
future.apply()
to parallelize
forecast()
when thefuture
package is attached (#268).
Breaking changes
- The residuals obtained from the
augment()
function are no longer controlled
by thetype
argument. Response residuals (y - yhat
) are now always found
in the.resid
column, and innovation residuals (the model's error) are now
found in the.innov
column. Response residuals will differ from innovation
residuals when transformations are used, and if the model has non-additive
residuals. dist_*()
functions are now removed, and are completely replaced by the
distributional package. These are removed to prevent masking issues when
loading packages.fortify(<fable>)
will now return a tibble with the same structure as the
fable, which is more useful for plotting forecast distributions with the
ggdist package. It can no longer be used to extract intervals from the
forecasts, this can be done usinghilo()
, and numerical values from a
<hilo>
can be extracted withunpack_hilo()
orinterval$lower
.
Bug fixes
- Fixed issue with aggregated date vectors (#230).
- Fixed display of models in
View()
panel. - Fixed issue with combination models not inheriting vctrs functionality (#237).
aggregate_key()
can now be used with non-syntactic variable names.- Added tsibble cast methods for fable and dable objects, fixing issues with
tidyverse functionality between datasets of different column orders (#247). - Fixed
refit()
dropping reconciliation attributes (#251).
CRAN v0.2.0
New features
- Distributions are now provided by the distributional package, which is more
space efficient and allows calculation of distributional statistics including
themean()
,median()
,variance()
,quantile()
,cdf()
anddensity()
. autoplot.fbl_ts()
andautolayer.fbl_ts()
now accept thepoint_forecast
argument, which is a named list of functions that describe the method used to
obtain the point forecasts. If multiple are specified, each method will be
identified using thelinetype
.- Added accuracy measures:
RMSSE()
,pinball_loss()
,scaled_pinball_loss()
. - Added accessor functions for column names (or metadata) of interest. This
includes models in a mable (mable_vars()
), response variables
(response_vars()
) and distribution variables (distribution_var()
). - Added support for combinations of non-normal forecasts, which produces mean
point forecasts only. - Added support for reconciling non-normal forecasts, which produces reconciled
point forecasts only.
Improvements
- Improved dplyr support. You can now use
bind_*()
and*_join()
operations
on mables, dables, and fables. More verbs are supported by these extension
data classes, and so behaviour should work closer to what is expected. - Progress reporting is now handled by the progressr package. This allows you to
decide if, when, and how progress is reported. To show progress, wrap your
code in theprogressr::with_progress()
function. Progress will no longer be
displayed automatically during lengthy calculations. - Improved support for streaming data to models with transformed response
variables. hilo.fbl_ts()
now keeps existing columns of a fable.forecast()
will now return an empty fable instead of erroring when no
forecasts are requested.is_aggregated()
now works for non-aggregated data types.- Documentation improvements.
Breaking changes
- The fable returned by
forecast()
now stores the distribution in the column
named the response variable (previously, this was the point forecast). Point
forecasts are now stored in the.mean
column, which can be customised using
thepoint_forecast
argument. - The
bias_adjust
option for forecast() is replaced bypoint_forecast
,
allowing you to specify which point forecast measures to display (fable/#226).
This has been done to reduce confusion around the argument's usage,
disambiguate the returned point forecast's meaning, and also allow users
to specify which (if any) point forecasts to provide. - The data coercion functions
as_mable
,as_dable
, andas_fable
have been
changed to accept character vectors for specifying common attributes (such as
response variables, and distributions). - The
models
argument formable
andas_mable
has been replaced withmodel
for consistency with the lack of plural inkey
. - Intervals from multivariate distributions are now returned as data frames of
hilo
intervals. The columns are the response variables. Similar structures
are returned when computing other distributional statistics like themean
. hilo
intervals can no longer be unnested as they are now stored more
efficiently as a vctrs record type. Theunpack_hilo()
function will continue
to function as expected, and you can now obtain the components of the interval
withx$lower
,x$upper
, andx$level
,rbind()
methods are deprecated in favour ofbind_rows()
- The row order of wide to long mable operations (such as
accuracy()
) has
changed (due to shift topivot_longer()
fromgather()
). Model column name
values are now nested within key values, rather than key values nested in
model name values.
Bug fixes
- Fixed
show_gap
option not working when more than one forecast is plotted. - Fixed
autolayer()
plotting issues due to inherited aesthetics. aggregate_key()
no longer drops keys, instead they are kept as .- Forecast reconciliation now works with historical data that is not temporally
aligned. - Fixed
forecast()
producing forecasts viah
whennew_data
does not
include a given series (#202).
CRAN v0.1.3
Improvements
- Better support for tidyverse packages using vctrs.
- Performance improvements for reconciliation and parsing.
xreg()
can now be called directly as a special.
Bug fixes
- Fixed
accuracy.fbl_ts()
error when certain names were used in the fable.