Print the predict.ptLasso object.
print.predict.ptLasso.Rd
Print the predict.ptLasso object.
Usage
# S3 method for class 'predict.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
fit = ptLasso(x, y, groups = groups, family = "gaussian", type.measure = "mse")
pred = predict(fit, xtest, groupstest, ytest=ytest, s="lambda.min")
print(pred)
#>
#> Call:
#> predict.ptLasso(object = fit, xtest = xtest, groupstest = groupstest,
#> ytest = ytest, s = "lambda.min")
#>
#>
#> alpha = 0.5
#>
#> Performance (Mean squared error):
#>
#> allGroups mean group_1 group_2 group_3 group_4 group_5 r^2
#> Overall 682.5 682.5 654.5 486.9 569.7 730.8 970.8 0.5225
#> Pretrain 513.4 513.4 455.3 414.8 589.1 578.7 529.1 0.6408
#> Individual 560.7 560.7 534.1 440.5 649.3 618.1 561.5 0.6077
#>
#> Support size:
#>
#> Overall 52
#> Pretrain 93 (10 common + 83 individual)
#> Individual 109
# If ytest is not supplied, just prints the pretrained predictions.
pred = predict(fit, xtest, groupstest, s="lambda.min")
print(pred)
#>
#> Call:
#> predict.ptLasso(object = fit, xtest = xtest, groupstest = groupstest,
#> s = "lambda.min")
#>
#>
#> alpha = 0.5
#>
#> Support size:
#>
#> Overall 52
#> Pretrain 93 (10 common + 83 individual)
#> Individual 109