similarity_measures_regression: Similarity Measure Infrastructure for Stability Assessment...

Description Usage Arguments Details See Also Examples

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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)

stablelearner documentation built on Jan. 13, 2021, 5:41 p.m.