Nothing
yhat_lars <-
function(dfTrain, dfTest, normalize=TRUE){
Xtr <- as.matrix.data.frame(dfTrain)
ytr <- Xtr[,ncol(Xtr)]
Xtr <- Xtr[,-ncol(Xtr)]
ans <- lars(Xtr, ytr, type="lasso", normalize=normalize)
iopt <- which.min(summary(ans)$Cp) #best Cp
Xte <- as.matrix.data.frame(dfTest)
yte <- Xte[,ncol(Xte)]
Xte <- Xte[,-ncol(Xte)]
predict(ans, newx=Xte, s=iopt)$fit
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.