Description Usage Arguments Details Value See Also Examples
This function plots a heatmap of the fitted values in a
tskrr
model. The function is loosely based on
heatmap
, but uses a different mechanism and adds
a legend by default.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## S3 method for class 'tskrr'
plot(
x,
dendro = c("both", "row", "col", "none"),
which = c("fitted", "loo", "response", "residuals"),
exclusion = c("interaction", "row", "column", "both"),
replaceby0 = FALSE,
nbest = 0,
rows,
cols,
col = rev(heat.colors(20)),
breaks = NULL,
legend = TRUE,
main = NULL,
xlab = NULL,
ylab = NULL,
labRow = NULL,
labCol = NULL,
margins = c(5, 5),
...
)
|
x |
a tskrr model |
dendro |
a character value indicating whether a dendrogram should be constructed. |
which |
a character value indicating whether the fitted values, the leave-one-out values, the original response values or the residuals should be plotted. |
exclusion |
if |
replaceby0 |
if |
nbest |
a single integer value indicating the amount of best values
that should be selected. If |
rows |
a numeric or character vector indicating which rows should be selected from the model. |
cols |
a numeric or character vector indicating which columns should be selected from the model. |
col |
a vector with colors to be used for plotting |
breaks |
a single value specifying the number of
breaks (must be 1 more than number of colors), or a numeric
vector with the breaks used for the color code. If |
legend |
a logical value indicating whether or not the legend should be added to the plot. |
main |
a character value with a title for the plot |
xlab |
a character label for the X axis |
ylab |
a character label for the Y axis |
labRow |
a character vector with labels to be used on the rows.
Note that these labels are used as is (possibly reordered to match
the dendrogram). They can replace the labels from the model. Set to
|
labCol |
the same as |
margins |
a numeric vector with 2 values indicating the margins to
be used for the row and column labels (cfr |
... |
currently ignored |
The function can select a part of the model for plotting. Either you
specify rows
and cols
, or you specify nbest
.
If nbest
is specified, rows
and cols
are ignored.
The n highest values are looked up in the plotted values, and only
the rows and columns related to these values are shown then. This
allows for a quick selection of the highest predictions.
Dendrograms are created by converting the kernel matrices to a distance, using
d(x,y) = K(x,x)^2 + K(y,y)^2 - 2*K(x,y)
with K being the kernel function. The resulting distances are
clustered using hclust
and converted to a
dendrogram using as.dendrogram
.
an invisible list with the following elements:
val
: the values plotted
ddK
: if a row dendrogram was requested, the row dendrogram
ddG
: if a column dendrogram was requested,
the column dendrogram
breaks
: the breaks used for the color codes
col
: the colors used
tskrr
, tune
and
link{impute_tskrr}
to construct tskrr models.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.