Learn R Programming

FLLat (version 1.2-1)

predict.FLLat: Predicted Values and Weights based on the Fused Lasso Latent

Description

Calculates predicted values and weights for a new set of samples using the estimated features from a fitted Fused Lasso Latent Feature (FLLat) model.

Usage

# S3 method for FLLat
predict(object, newY=NULL, thresh=10^(-4), maxiter.T=100, …)

Arguments

object
A fitted FLLat model. That is, an object of class FLLat, as returned by FLLat.
newY
A matrix of new data from an aCGH experiment (usually in the form of log intensity ratios) or some other type of copy number data. Rows correspond to the probes and columns correspond to the samples. The number of probes must match the number of probes in the data used to produce the fitted FLLat model. Note that if newY is not specified, the fitted values from the fitted FLLat model are returned.
thresh
The threshold for determining when the predicted weights have converged. The default is \(10^{-4}\).
maxiter.T
The maximum number of iterations for the algorithm for calculating the predicted weights. The default is \(100\).
Arguments passed to or from other methods.

Value

A list with components:
pred.Y
The predicted values \(\hat{Y}^*\) for the new set of samples, or the fitted values \(\hat{Y}\) from the fitted FLLat model.
Theta
The predicted weights \(\hat{\Theta}^*\) for the new set of samples, or the estimated weights \(\hat{\Theta}\) from the fitted FLLat model.
niter
The number of iterations taken by the algorithm for calculating the predicted weights, or the number of iterations taken by the algorithm for producing the fitted FLLat model.
rss
The residual sum of squares based on the new set of samples, or based on the original data used in producing the fitted FLLat model.

Details

Based on the estimated features \(\hat{B}\) from a fitted FLLat model, this function predicts the new weights that need to be applied to each feature for predicting a new set of samples \(Y^*\). The predicted weights \(\hat{\Theta}^*\) are calculated by minimizing the residual sum of squares: $$RSS = \left\|Y^* - \hat{B}\Theta^*\right\|_F^2$$ where the \(L_2\) norm of each row of \(\hat{\Theta}^*\) is still constrained to be less than or equal to \(1\). From these predicted weights, the predicted values for the new set of samples are calculated as \(\hat{Y}^*=\hat{B}\hat{\Theta}^*\). These predicted values can useful when performing model validation.

Note that for the predictions to be meaningful and useful, the new set of samples \(Y^*\) must be similar in scale/magnitude to the original data used in producing the fitted FLLat model. If a new set of samples \(Y^*\) are not specified, the function returns the fitted values \(\hat{Y}\) and estimated weights \(\hat{\Theta}\) from the fitted FLLat model.

For more details, please see Nowak and others (2011) and the package vignette.

References

G. Nowak, T. Hastie, J. R. Pollack and R. Tibshirani. A Fused Lasso Latent Feature Model for Analyzing Multi-Sample aCGH Data. Biostatistics, 2011, doi: 10.1093/biostatistics/kxr012

See Also

FLLat

Examples

Run this code
## Load simulated aCGH data.
data(simaCGH)

## Divide the data into a training and test set.
tr.dat <- simaCGH[,1:15]
tst.dat <- simaCGH[,16:20]

## Run FLLat for J = 5, lam1 = 1 and lam2 = 9 on the training set.
result.tr <- FLLat(tr.dat,J=5,lam1=1,lam2=9)

## Calculate fitted values on the training set.
tr.pred <- predict(result.tr)

## Calculate predicted values and weights on the test set using the FLLat
## model (i.e., the features) fitted on the training set.
tst.pred <- predict(result.tr,newY=tst.dat)

## Plotting predicted values and data for the first sample in the test set.
plot(tst.dat[,1],xlab="Probe",ylab="Y")
lines(tst.pred$pred.Y[,1],col="red",lwd=3)

Run the code above in your browser using DataLab