plot.multiview: Plot coefficients from a "multiview" object

View source: R/multiview.R

plot.multiviewR Documentation

Plot coefficients from a "multiview" object

Description

Produces a coefficient profile plot of the coefficient paths for a fitted "multiview" object. The paths are colored by the data views, from which the features come.

Usage

## S3 method for class 'multiview'
plot(x, col_palette = NULL, label = FALSE, ...)

Arguments

x

A fitted "multiview" model.

col_palette

A set of colors to use for indicating different views. If NULL, the function will use the color palette "Set1" from the RColorBrewer package.

label

If TRUE, label the curves with variable sequence. numbers.

...

Other graphical parameters to plot.

Value

a NULL value as this function is really meant for its side-effect of generating a plot.

Examples

# Gaussian
x = matrix(rnorm(100 * 20), 100, 20)
z = matrix(rnorm(100 * 10), 100, 10)
y = rnorm(100)
fit1 = multiview(list(x=x,z=z), y, rho = 0)
plot(fit1, label = TRUE)

# Binomial
by = sample(c(0,1), 100, replace = TRUE)
fit2 = multiview(list(x=x,z=z), by, family = binomial(), rho=0.5)
plot(fit2, label=FALSE)

# Poisson
py = matrix(rpois(100, exp(y))) 
fit3 = multiview(list(x=x,z=z), py, family = poisson(), rho=0.5)
plot(fit3, label=TRUE)


multiview documentation built on April 3, 2023, 5:20 p.m.