UNPKG

@microsoft/compose-language-service

Version:
18 lines (17 loc) 992 B
/*!-------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------*/ /** * Fits a lognormal distribution to the given data and returns the mu, sigma, and median of the data. * Lognormal is a decent approximation of performance (i.e. durations of things). * Fun fact! Compose file line counts are very well-fit by a lognormal distribution, mu=3.7970, sigma=1.0152 * @see https://en.wikipedia.org/wiki/Log-normal_distribution * @param values The list of values to fit a lognormal distribution to * @returns The mu (log of median), sigma (stdev), and median, fit with a lognormal distribution */ export declare function logNormal(values: number[]): { mu: number; sigma: number; median: number; };