# similarity_measures_regression

0th

Percentile

##### Similarity Measure Infrastructure for Stability Assessment with Numerical Responses

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

Keywords
stability, measures, similariy
##### Usage
edist()
msdist()
rmsdist()

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.

stability

##### Aliases
• similarity_measures_regression
• edist
• msdist
• rmsdist
• cprob
• ccc
• pcc
• cosine
• rbfkernel
• tanimoto
##### Examples
# 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$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 {
# }

Documentation reproduced from package stablelearner, version 0.1-2, License: GPL-2 | GPL-3

### Community examples

Looks like there are no examples yet.