Description Usage Arguments Value Examples
View source: R/postpi_relate.R
This function is required to take in a data set (i.e. testing set) containing only observed and predicted outcomes and name for observed outcomes. It relates observed and predicted continuous outcomes through a gamma function. For categorical outcomes, user inputs observed outcomes and the probabilities of predicted outcomes (i.e. probabilities for each predicted category). It related categorical data through a user defined maching learning method from the caret package. The default method is k-nearest neighbours.
1 | postpi_relate(relation_dat, yobs, method_categorical = "knn")
|
relation_dat |
testing set that contains observed outcomes and predicted outcomes (continuous data) or probabilities of predicted outcomes (categorical data) |
yobs |
name of the observed outcome in the testing set |
method_categorical |
Method to be passed to caret train function for categorical data |
rel_model relationship model between observed outcomes and predicted outcomes/probabilities
1 2 3 4 5 | data(RINdata,package="postpi")
testing <- RINdata[1:2000,]
relation_dat <- data.frame(actual = testing$actual, pred = testing$predictions)
relation_model <- postpi_relate(relation_dat,actual)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.