plot.mixture: Plot an object of class mixture

View source: R/plot-mixture.R

plot.mixtureR Documentation

Plot an object of class mixture

Description

provides different diagnostic plots for an aggregation procedure.

Usage

## S3 method for class 'mixture'
plot(
  x,
  pause = FALSE,
  col = NULL,
  alpha = 0.01,
  dynamic = T,
  type = "all",
  max_experts = 50,
  col_by_weight = TRUE,
  xlab = NULL,
  ylab = NULL,
  main = NULL,
  subset = NULL,
  ...
)

Arguments

x

an object of class mixture. If awake is provided (i.e., some experts are unactive), their residuals and cumulative losses are computed by using the predictions of the mixture.

pause

if set to TRUE (default) displays the plots separately, otherwise on a single page

col

the color to use to represent each experts, if set to NULL (default) use RRColorBrewer::brewer.pal(...,"Spectral"

alpha

numeric. Smoothing parameter for contribution plot (parameter 'f' of function lowess).

dynamic

boolean. If TRUE, graphs are generated with rAmCharts, else with base R.

type

char.

  • 'all' Display all the graphs ;

  • 'plot_weight', 'boxplot_weight', 'dyn_avg_loss', 'cumul_res', 'avg_loss', 'contrib' Display the selected graph alone.

max_experts

integer. Maximum number of experts to be displayed (only the more influencial).

col_by_weight

boolean. If TRUE (default), colors are ordered by weights of each expert, else by column

xlab

character. Custom x-axis label (individual plot only)

ylab

character. Custom y-axis label (individual plot only)

main

character. Custom title (individual plot only)

subset

numeric. Positive indices for subsetting data before plot.

...

additional plotting parameters

Value

plots representing: plot of weights of each expert in function of time, boxplots of these weights, cumulative loss L_T=∑_{t=1}^T l_{i,t} of each expert in function of time, cumulative residuals ∑_{t=1}^T (y_t-f_{i,t}) of each expert's forecast in function of time, average loss suffered by the experts and the contribution of each expert to the aggregation p_{i,t}f_{i,t} in function of time.

Author(s)

Pierre Gaillard <pierre@gaillard.me>

Yannig Goude <yannig.goude@edf.fr>

See Also

See opera-package and opera-vignette for a brief example about how to use the package.


Dralliag/opera documentation built on Jan. 31, 2023, 1:08 p.m.