Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/predict.FLLat.R
Calculates predicted values and weights for a new set of samples using the estimated features from a fitted Fused Lasso Latent Feature (FLLat) model.
1 2 |
object |
A fitted FLLat model. That is, an object of class
|
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
|
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. |
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{Θ}* are calculated by minimizing the residual sum of squares:
RSS = (||Y* - \hat{B}Θ*||_F)^2
where the L_2 norm of each row of \hat{Θ}* 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{Θ}*. 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{Θ} from the fitted FLLat model.
For more details, please see Nowak and others (2011) and the package vignette.
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{Θ}* for the new set of samples, or the estimated weights \hat{Θ} 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. |
Gen Nowak gen.nowak@gmail.com, Trevor Hastie, Jonathan R. Pollack, Robert Tibshirani and Nicholas Johnson.
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.