Print the predict.cv.ptLasso object.
print.predict.cv.ptLasso.Rd
Print the predict.cv.ptLasso object.
Usage
# S3 method for class 'predict.cv.ptLasso'
print(x, ...)
Examples
# Train data
out = gaussian.example.data()
x = out$x; y=out$y; groups = out$group;
# Test data
outtest = gaussian.example.data()
xtest=outtest$x; ytest=outtest$y; groupstest=outtest$groups
cvfit = cv.ptLasso(x, y, groups = groups, family = "gaussian", type.measure = "mse")
pred = predict(cvfit, xtest, groupstest, ytest=ytest, s="lambda.min")
print(pred)
#>
#> Call:
#> predict.cv.ptLasso(object = cvfit, xtest = xtest, groupstest = groupstest,
#> ytest = ytest, s = "lambda.min")
#>
#>
#> alpha = 0.3
#>
#> Performance (Mean squared error):
#>
#> allGroups mean group_1 group_2 group_3 group_4 group_5 r^2
#> Overall 653.7 653.7 705.0 473.6 397.6 643.1 1049 0.5264
#> Pretrain 519.1 519.1 489.6 449.0 539.9 507.9 609 0.6239
#> Individual 561.0 561.0 486.5 547.9 573.3 577.4 620 0.5936
#>
#> Support size:
#>
#> Overall 57
#> Pretrain 99 (14 common + 85 individual)
#> Individual 111
# If ytest is not supplied, just prints the pretrained predictions.
pred = predict(cvfit, xtest, groupstest, s="lambda.min")
print(pred)
#>
#> Call:
#> predict.cv.ptLasso(object = cvfit, xtest = xtest, groupstest = groupstest,
#> s = "lambda.min")
#>
#>
#> alpha = 0.3
#>
#> Support size:
#>
#> Overall 57
#> Pretrain 99 (14 common + 85 individual)
#> Individual 111