Last chance! 50% off unlimited learning
Sale ends in
This function accepts input from slab()
along with a vector of
horizon names, and returns a data.frame
of the most likely horizon
boundaries.
get.ml.hz(x, o.names = attr(x, which = "original.levels"))
output from slab
an optional character vector of horizon designations that will be used in the final table
A dataframe with the following columns:
horizon names
top boundary
bottom boundary
integrated probability over thickness of each ML horizon, rounded to the nearest integer
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: https://en.wikipedia.org/wiki/Brier_score. Lower values suggest better agreement between ML horizon label and class-wise probabilities.
mean Shannon entropy (bits), derived from probabilities within each most-likely horizon. Larger values suggest more confusion within each ML.
This function expects that x
is a data.frame generated by
slab
. If x
was not generated by slab
, then
o.names
is required.
# NOT RUN {
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)
# }
Run the code above in your browser using DataLab