Skip to content

Instead of just averaging, you could delete the ones that are too far off from the others #2

@Capaverde

Description

@Capaverde

I think that's how normal ntp works
Just ignore a value if it is not in the range [Q1-k(Q3-Q1),Q3+k(Q3-Q1)], where Q1 and Q3 are the 25th and 75th percentiles, k is a constant and to calculate a percentile you just do:

data_set = data_set.sort();
for (var i=0;i<data_set.length;i++){
    if (i>=data_set.length*percentile/100){
           answer = data_set[i];
           break;
    }
}

Yes, I just read all that on wikipedia

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions