Polars
auc(x, y, method='trapezoidal')
Computes the area under the curve (AUC) via numerical integration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
IntoExpr
|
The x-axis |
required |
y |
IntoExpr
|
The y-axis |
required |
method |
Literal['rectangular', 'trapezoidal']
|
If "rectangular", use rectangular integration, if "trapezoidal", use trapezoidal integration, by default "trapezoidal" |
'trapezoidal'
|
Returns:
Type | Description |
---|---|
Expr
|
|
Raises:
Type | Description |
---|---|
ValueError
|
If |
Source code in python/rapidstats/polars.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|
is_close(x, y, rtol=1e-05, atol=1e-08, null_equal=False)
Compares the relative equality of the inputs.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
IntoExpr
|
|
required |
y |
IntoExpr
|
|
required |
rtol |
float
|
Relative tolerance, by default 1e-05 |
1e-05
|
atol |
float
|
Absolute tolerance, by default 1e-08 |
1e-08
|
null_equal |
bool
|
If True, considers nulls to be equal, by default False |
False
|
Returns:
Type | Description |
---|---|
Expr
|
|
Source code in python/rapidstats/polars.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
|