pred.score: Function computing performance of prediction; methods include...

Description Usage Arguments Value Author(s) See Also Examples

Description

This function computes prediction performance; methods include r2, nrmse and mcc.

Usage

1
pred.score(data, pred, categories, method = c("r2", "nrmse", "mcc"))

Arguments

data
pred
categories

if this parameter missing, 'data' should be already discretize; otherwise either a single integer or a vector of integers specifying the number of categories used to discretize each variable (data are then discretized using equal-frequency bins) or a list of cutoffs to use to discretize each of the variables in 'data' matrix. If method='bayesnet', this parameter should be specified by the user.

method

Value

A vector of performance scores, one for each node

Author(s)

Benjamin Haibe-Kains, Catharina Olsen

See Also

netinf.predict

Examples

1
2
3
4
5
6
7
8
set.seed(54321)
xx <- runif(100)
## R2
pred.score(data=xx, pred=xx+rnorm(100)/10, method="r2")
## NRMSE
pred.score(data=xx, pred=xx+rnorm(100)/10, method="nrmse")
## MCC
pred.score(data=xx, pred=xx+rnorm(100)/10, categories=3, method="mcc")

predictionet documentation built on Nov. 8, 2020, 7:48 p.m.