mode
Calculates the most frequent value from a list of numbers, returning its frequency-based central tendency for statistical analysis.
Instructions
Computes the mode of a list of numbers.
Args: data: A list of numerical values.
Returns: On success: {"result": } On error: {"error": }
Examples: >>> mode([1, 2, 2, 3]) {'result': 2.0} >>> mode([1, 1, 2, 2]) {'result': 1.0} >>> mode([]) {'error': 'Cannot compute mode of empty array'}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes |