Negligent Parachute Maintainers
    Have ideas to improve npm?Join in the discussion! »

    speed-percentile

    1.3.0 • Public • Published

    speed-percentile

    Build Status

    A JavaScript utility to compute percentile speed from speed histogram.

    Example:

    var percentile = require('speed-percentile');
    
    var histogram = {20: 1, 21: 1, 22: 2, 23: 3, 24: 4, 25: 5};
    
    var speed = percentile(histogram, 0.85, 'R4');
    //=> 24.52
    

    Install

    npm install speed-percentile
    

    Test

    cd to speed-percentile folder then run

    npm test
    

    Syntax

    percentile

    var o1 = percentile(P1, P2, P3)

    Computes the p-th precentile speed from a sparse hash speed histogram.

    Inputs:

    param data type description
    P1 associative array with integer keys speed histogram hash {<speed>:<count>}
    P2 number or array one or more percentiles in decimal
    P3 string algorithm flag (optional): 'R4', 'R5' (default)

    Algorithms:

    Outputs:

    output data type description
    o1 number or array corresponding speed(s) sorted in descending order

    Keywords

    none

    Install

    npm i speed-percentile

    DownloadsWeekly Downloads

    0

    Version

    1.3.0

    License

    ISC

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar