chiScores {AssocBin}R Documentation

Scoring functions to choose splits

Description

These functions define scores to evaluate candidate splits along a single margin within partition.

Usage

chiScores(bounds, nbelow, n)

miScores(bounds, nbelow, n)

randScores(bounds, nbelow, n)

Arguments

bounds

numeric vector giving candidate split bounds in increasing order

nbelow

integer vector giving the number of points below each candidate split

n

the total number of points in the bin to be split

Details

Scorings

Each of these functions accepts 'boundss', an ordered numeric vector containing the candidate splits within a bin and the bin bounds all in increasing order, and 'nbelow' which gives the count of points below each split. 'n' is used to determine the number of points above the split.

Value

A vector of scores.

Functions

Author(s)

Chris Salahub

Examples

vals <- c(2, 5, 12, 16, 19)
chiScores(vals, 1:3, 3)
## same for the miScores
miScores(vals, 1:3, 3)
## random scoring produces different output every time
randScores(vals, 1:3, 3)
randScores(vals, 1:3, 3)

[Package AssocBin version 1.0-0 Index]