diff --git a/docs/en/sql-reference/functions/array-functions.md b/docs/en/sql-reference/functions/array-functions.md index 11caa4fe749..9d42f8423d3 100644 --- a/docs/en/sql-reference/functions/array-functions.md +++ b/docs/en/sql-reference/functions/array-functions.md @@ -3224,7 +3224,8 @@ Result: ## arrayNormalizedGini -Function `arrayNormalizedGini` is used to calculate the normalized Gini coefficient. +Calculates the normalized Gini coefficient. +For more details, see https://arxiv.org/abs/1912.07753. **Syntax** @@ -3239,7 +3240,7 @@ arrayNormalizedGini(predicted, label) **Returned Value** -- A tuple contains Gini coefficient of predicted values, Gini coefficient of label values and the normalized Gini coefficient, which is the ratio between predicted Gini coefficient and label Gini coefficient. +- A tuple containing the Gini coefficients of the predicted values, the Gini coefficient of the normalized values, and the normalized Gini coefficient (= the ratio of the former two Gini coefficients). **Examples** @@ -3257,8 +3258,6 @@ Result: └─────────────────────────────────────────────────────────────┘ ``` -- For more details, check https://arxiv.org/abs/1912.07753 - ## Distance functions All supported functions are described in [distance functions documentation](../../sql-reference/functions/distance-functions.md). diff --git a/src/Functions/array/arrayNormalizedGini.cpp b/src/Functions/array/arrayNormalizedGini.cpp index 6153e06d8d2..b5051c49fa8 100644 --- a/src/Functions/array/arrayNormalizedGini.cpp +++ b/src/Functions/array/arrayNormalizedGini.cpp @@ -421,12 +421,10 @@ private: REGISTER_FUNCTION(NormalizedGini) { - FunctionDocumentation::Description doc_description = "The function is used to calculate the normalized Gini coefficient."; + FunctionDocumentation::Description doc_description = "Calculates the normalized Gini coefficient. For more details, see https://arxiv.org/abs/1912.07753."; FunctionDocumentation::Syntax doc_syntax = "arrayNormalizedGini(predicted, label)"; - FunctionDocumentation::Arguments doc_arguments - = {{"predicted", "Predicted value (Array(T))."}, {"label", "Actual value (Array(T))."}}; - FunctionDocumentation::ReturnedValue doc_returned_value = "A tuple contains predicted Gini coefficient, " - "label Gini coefficient and the normalized Gini coefficient ."; + FunctionDocumentation::Arguments doc_arguments = {{"predicted", "Predicted value (Array(T))."}, {"label", "Actual value (Array(T))."}}; + FunctionDocumentation::ReturnedValue doc_returned_value = "A tuple containing the Gini coefficients of the predicted values, the Gini coefficient of the normalized values, and the normalized Gini coefficient (= the ratio of the former two Gini coefficients)."; FunctionDocumentation::Examples doc_examples = {{"Example", "SELECT arrayNormalizedGini([0.9, 0.3, 0.8, 0.7],[6, 1, 0, 2]);",