get.ml.hz: Determine ML Horizon Boundaries

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/get.ml.hz.R

Description

This function accepts input from slab() along with a vector of horizon names, and returns a data.frame of the most likely horizon boundaries.

Usage

1
get.ml.hz(x, o.names)

Arguments

x

output from slab

o.names

an optional character vector of horizon designations that will be used in the final table

Details

This function is expecting that x is a data.frame generated by slab. If x was not generated by slab, then o.names is required.

Value

A dataframe with the following columns:

hz

horizon names

top

top boundary

bottom

bottom boundary

confidence

integrated probability / ML horizon thickness, rounded to the nearest integer

pseudo.brier

A "pseudo"" Brier Score for a multi-class prediction, where the most-likely horizon label is treated as the "correct" outcome. Details on the calculation for traditional Brier Scores here: http://en.wikipedia.org/wiki/Brier_score#Original_definition_by_Brier.

Author(s)

D.E. Beaudette

See Also

slab

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(sp1)
depths(sp1) <- id ~ top + bottom

# normalize horizon names: result is a factor
sp1$name <- generalize.hz(sp1$name, 
  new=c('O','A','B','C'), 
  pat=c('O', '^A','^B','C'))

# compute slice-wise probability so that it sums to contributing fraction, from 0-150
a <- slab(sp1, fm= ~ name, cpm=1, slab.structure=0:150)

# generate table of ML horizonation
get.ml.hz(a, o.names=c('O','A','B','C'))

aqp documentation built on May 31, 2017, 2:24 a.m.