predict.bpwpm: Predict Method for a bpwpm

Description Usage Arguments Value Examples

View source: R/predict_funcs.R

Description

Predict Method for a bpwpm

Usage

1
2
3
## S3 method for class 'bpwpm'
predict(object, new_Y, new_X, thin = 0, burn_in = 0,
  type = "mean", ...)

Arguments

object

An object of the class bpwpm

new_Y

New Y data to make the prediction for. However, the train Y data can be used to evaluate the model

new_X

New X data to make the prediction for. However, the train X data can be used to evaluate the model

thin

A thinning parameter for the MCMC Chain

burn_in

A burn in parameter for the MCMC Chain

type

The type of punctual estimation for the parameters. Options include: mean, mode or median.

...

further arguments passed to or from other methods

Value

An object of the class bpwpm_prediction containing:

Info

A formated string that describes the basics of the model

type

The type of posterior probability used

bpwpm_params

An object of the class bpwpm_params, created by the function posterior_params

contingency_table

The confusion matrix for this model, and prediction

accuracy

The accuracy of the model. This can be misleading.

log_loss

The log loss for the Y response and the fitted probabilities

fitted_probabilities

The fitted probabilities for the input

X

The X input matrix passed down to the method. Used for plotting methods

Y

The Y input matrix passed down to the method. Used for plotting methods

Examples

1
2
(model1, train_Y, train_X, 2, 1000, mean)
(model2, test_Y, test_X, 1, 0, mode)

PaoloLuciano/bpwpm documentation built on May 20, 2019, 4:25 p.m.