Skip to contents

This function computes the relative belief ratio based on the given features and parameters.

Usage

relbel(
  x,
  y,
  initialization_function = NULL,
  repetition = 5000,
  L = 20,
  i_0 = 1
)

Arguments

x

a numeric vector matrix, or data frame; the feature(s).

y

a

initialization_function

A function used for initializing the mean and standard deviation. See 'Details' for more information.

repetition

The number of repetitions.

L

The value of L.

i_0

The value of i_0.

Value

The computed relative belief ratio.

Author

Ahmad Alsaleh

Examples

initialization_function <- function(feature) {
  list(a = 0, b = 2, s_1 = 2, s_2 = 4)
}
repetition <- 5000
L <- 20
i_0 <- 1

dataset <- data.frame(
  x1 = c(-0.8606568, 1.4141698, 0.2235239, -1.1968656, 0.7677741),
  x2 = c(-0.318, -0.712, -1.320, -0.008, 0.048),
  y = c("A", "B", "A", "B", "B")
)

relbel(
  dataset[1:2], dataset["y"],
  initialization_function, repetition, L, i_0
)
#>              x1     x2
#> relbel   1.0800 0.9560
#> strength 0.6046 0.2968