Learn R Programming

predictionet (version 1.18.0)

pred.score: Function computing performance of prediction; methods include r2, nrmse and mcc

Description

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

Usage

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

See Also

netinf.predict

Examples

Run this code
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")

Run the code above in your browser using DataLab