chiScores | R Documentation |
These functions define scores to evaluate candidate splits along a single margin within partition.
chiScores(bounds, nbelow, n)
miScores(bounds, nbelow, n)
randScores(bounds, nbelow, n)
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 |
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.
A vector of scores.
chiScores()
: A chi-squared statistic score
miScores()
: A mutual information score
randScores()
: A random score for random splitting
Chris Salahub
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.