qualHighest: Score an empirical density distribution of values, where the...

Description Usage Arguments Details Value Examples

View source: R/fcn_qualities.R

Description

The score is computed according to

Usage

1

Arguments

x

Vector of numeric values (e.g. height of histogram bins)

N

Length of x (just a precaution currently)

Details

q = ((N-1) - sum_i( ((N-i-1)*x_i) ) / (N-1)

Scores range from 0 (worst), to 1 (best). E.g. c(0,0,0,16) would yield a score of 1. c(16,0,0,0,0) gives a score of 0.

Value

Quality score in the range of [0,1]

Examples

1
2
3
4
5
 qualHighest(c(0,0,0,16), 4)   ## 1
 qualHighest(c(16,0,0,0), 4)   ## 0 
 qualHighest(c(1,1,1,1), 4)    ## 0.5
 qualHighest(c(0,16,0,0), 4)   ## 1/3
 

cbielow/PTXQC documentation built on Sept. 22, 2018, 3:21 p.m.