RegrCount
This class provides a statistical aggregate function that returns the number of non-null pairs of expressions used in a linear regression. It is typically used within database queries to count the data points available for regression analysis, returning an integer result with a default value of zero for empty result sets.
Attributes
| Attribute | Type | Description |
|---|---|---|
| function | string = REGR_COUNT | The SQL aggregate function name used for calculating the number of input rows in a linear regression model. |
| output_field | [IntegerField](../../../../forms/fields/integerfield.md?sid=django_forms_fields_integerfield) | The model field type used to represent the resulting count, ensuring the value is handled as an integer. |
| empty_result_set_value | integer = 0 | The default value returned by the aggregate when the result set contains no rows. |
Constructor
Signature
def RegrCount() - > null
Signature
def RegrCount(
y: string,
x: string,
**extra: dict
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| y | string | The name of the dependent variable field |
| x | string | The name of the independent variable field |
| **extra | dict | Additional keyword arguments to be passed to the parent StatAggregate constructor |