stablelearner (version 0.1-2)

similarity_measures_regression: Similarity Measure Infrastructure for Stability Assessment with Numerical Responses

Description

Functions that provide objects with functionality used by stability to measure the similarity between numeric predictions of two results in regression problems.

Usage

edist()
  msdist()
  rmsdist()
  madist()
  qadist(p = 0.95)
  
  cprob(kappa = 0.1)
  rbfkernel()
  tanimoto()
  cosine()
  
  ccc()
  pcc()

Arguments

p

A numeric value between 0 and 1 specifying the probability to which the sample quantile of the absolute distance between the predictions is computed.

kappa

A positive numeric value specifying the upper limit of the absolute distance between the predictions to which the coverage probability is computed.

Details

The similarity measure functions provide objects that include functionality used by stability to measure the similarity between numeric predictions of two results in regression problems.

The edist (euclidean distance), msdist (mean squared distance), rmsdist (root mean squared distance), madist (mean absolute distance) and qadist (quantile of absolute distance) functions implement scale-variant distance measures that are unbounded.

The cprob (coverage probability), rbfkernel (gaussian radial basis function kernel), tanimoto (tanimoto coefficient) and cosine (cosine similarity) functions implement scale-variant distance measures that are bounded.

The ccc (concordance correlation coefficient) and pcc (pearson correlation coefficient) functions implement scale-invariant distance measures that are bounded between 0 and 1.

See Also

stability

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
set.seed(0)

library("partykit")

airq <- subset(airquality, !is.na(Ozone))
m1 <- ctree(Ozone ~ ., data = airq[sample(1:nrow(airq), replace = TRUE),])
m2 <- ctree(Ozone ~ ., data = airq[sample(1:nrow(airq), replace = TRUE),])

p1 <- predict(m1)
p2 <- predict(m2)

## euclidean distance
m <- edist()
m$measure(p1, p2)

## mean squared distance
m <- msdist()
m$measure(p1, p2)

## root mean squared distance
m <- rmsdist()
m$measure(p1, p2)

## mean absolute istance
m <- madist()
m$measure(p1, p2)

## quantile of absolute distance
m <- qadist()
m$measure(p1, p2)

## coverage probability
m <- cprob()
m$measure(p1, p2)

## gaussian radial basis function kernel
m <- rbfkernel()
m$measure(p1, p2)

## tanimoto coefficient
m <- tanimoto()
m$measure(p1, p2)

## cosine similarity
m <- cosine()
m$measure(p1, p2)

## concordance correlation coefficient
m <- ccc()
m$measure(p1, p2)

## pearson correlation coefficient
m <- pcc()
m$measure(p1, p2)

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab