@@ -232,12 +232,12 @@ def _parse_formula(
232
232
formula : FormulaSpec , include_intercept : bool = True
233
233
) -> tuple [Optional [Formula ], Formula ]:
234
234
"""
235
- Parse and transform the formula for use in a GeneralizedLinearRegressor.
235
+ Parse and transform the formula for use in a GeneralizedLinearRegressor.
236
236
237
237
The left-hand side and right-hand side of the formula are separated. If an
238
- intercept is present, it is removed from the right-hand side, and a boolean
239
- flag is returned to indicate whether or not an intercept should be added to
240
- the model.
238
+ intercept is present, it wil be removed from the right-hand side, and a
239
+ boolean flag to indicate whether or not an intercept should be added to
240
+ the model will be returned .
241
241
242
242
Parameters
243
243
----------
@@ -1315,7 +1315,7 @@ def linear_predictor(
1315
1315
context : Optional[Union[int, Mapping[str, Any]]], default=0
1316
1316
The context to use for evaluating the formula. If an integer, the
1317
1317
context is taken from the stack frame of the caller at the given
1318
- depth. If a dict, it is used as the context directly .
1318
+ depth. If a dict, it is directly used as the context.
1319
1319
1320
1320
Returns
1321
1321
-------
@@ -1406,7 +1406,7 @@ def predict(
1406
1406
context : Optional[Union[int, Mapping[str, Any]]], default=0
1407
1407
The context to use for evaluating the formula. If an integer, the
1408
1408
context is taken from the stack frame of the caller at the given
1409
- depth. If a dict, it is used as the context directly .
1409
+ depth. If a dict, it is directly used as the context.
1410
1410
1411
1411
Returns
1412
1412
-------
@@ -1480,7 +1480,7 @@ def coef_table(
1480
1480
context : Optional[Union[int, Mapping[str, Any]]], default=0
1481
1481
The context to use for evaluating the formula. If an integer, the
1482
1482
context is taken from the stack frame of the caller at the given
1483
- depth. If a dict, it is used as the context directly .
1483
+ depth. If a dict, it is directly used as the context.
1484
1484
1485
1485
Returns
1486
1486
-------
@@ -1563,7 +1563,7 @@ def wald_test(
1563
1563
1564
1564
The right hand side of the tested hypothesis is specified by ``r``. In the
1565
1565
case of a ``terms``-based test, the null hypothesis is that each coefficient
1566
- relating to a term is equal to the corresponding value in ``r``.
1566
+ relating to a term equals the corresponding value in ``r``.
1567
1567
1568
1568
Parameters
1569
1569
----------
@@ -1578,7 +1578,7 @@ def wald_test(
1578
1578
of the expressions separated by ``+`` signs. Otherwise, a term is one column
1579
1579
in the input data. As categorical variables need not be one-hot encoded in
1580
1580
glum, in their case, the hypothesis to be tested is that the coefficients
1581
- for all of their levels are equal to ``r``.
1581
+ of all categories are equal to ``r``.
1582
1582
r : np.ndarray, optional, default=None
1583
1583
The vector representing the values of the linear combination.
1584
1584
If None, the test is for whether the linear combinations of the coefficients
@@ -1610,7 +1610,7 @@ def wald_test(
1610
1610
context : Optional[Union[int, Mapping[str, Any]]], default=0
1611
1611
The context to use for evaluating the formula. If an integer, the
1612
1612
context is taken from the stack frame of the caller at the given
1613
- depth. If a dict, it is used as the context directly .
1613
+ depth. If a dict, it is directly used as the context.
1614
1614
1615
1615
Returns
1616
1616
-------
@@ -2019,7 +2019,7 @@ def _wald_test_term_names(
2019
2019
of the expressions separated by ``+`` signs. Otherwise, a term is one column
2020
2020
in the input data. As categorical variables need not be one-hot encoded in
2021
2021
glum, in their case, the hypothesis to be tested is that the coefficients
2022
- for all of their levels are equal to ``r``.
2022
+ of all categories are equal to ``r``.
2023
2023
values: Sequence, optional, default=None
2024
2024
The values to which coefficients are compared. If None, the test is
2025
2025
for whether the coefficients are zero.
@@ -2157,7 +2157,8 @@ def std_errors(
2157
2157
context : Optional[Union[int, Mapping[str, Any]]], default=0
2158
2158
The context to use for evaluating the formula. If an integer, the
2159
2159
context is taken from the stack frame of the caller at the given
2160
- depth. If a dict, it is used as the context directly."""
2160
+ depth. If a dict, it is directly used as the context.
2161
+ """
2161
2162
captured_context = capture_context (
2162
2163
context + 1 if isinstance (context , int ) else context
2163
2164
)
@@ -2200,36 +2201,48 @@ def covariance_matrix(
2200
2201
X : {array-like, sparse matrix}, shape (n_samples, n_features), optional
2201
2202
Training data. Can be omitted if a covariance matrix has already
2202
2203
been computed.
2204
+
2203
2205
y : array-like, shape (n_samples,), optional
2204
2206
Target values. Can be omitted if a covariance matrix has already
2205
2207
been computed.
2208
+
2206
2209
mu : array-like, optional, default=None
2207
2210
Array with predictions. Estimated if absent.
2208
2211
offset : array-like, optional, default=None
2209
2212
Array with additive offsets.
2213
+
2210
2214
sample_weight : array-like, shape (n_samples,), optional, default=None
2211
2215
Individual weights for each sample.
2216
+
2212
2217
dispersion : float, optional, default=None
2213
2218
The dispersion parameter. Estimated if absent.
2219
+
2214
2220
robust : boolean, optional, default=None
2221
+
2215
2222
Whether to compute robust standard errors instead of normal ones.
2216
2223
If not specified, the model's ``robust`` attribute is used.
2217
2224
clusters : array-like, optional, default=None
2225
+
2218
2226
Array with cluster membership. Clustered standard errors are
2219
2227
computed if clusters is not None.
2228
+
2220
2229
expected_information : boolean, optional, default=None
2221
2230
Whether to use the expected or observed information matrix.
2222
2231
Only relevant when computing robust standard errors.
2232
+
2223
2233
If not specified, the model's ``expected_information`` attribute is used.
2224
2234
store_covariance_matrix : boolean, optional, default=False
2225
2235
Whether to store the covariance matrix in the model instance.
2226
2236
If a covariance matrix has already been stored, it will be overwritten.
2237
+
2227
2238
skip_checks : boolean, optional, default=False
2228
2239
Whether to skip input validation. For internal use only.
2240
+
2229
2241
context : Optional[Union[int, Mapping[str, Any]]], default=0
2230
2242
The context to use for evaluating the formula. If an integer, the
2231
2243
context is taken from the stack frame of the caller at the given
2232
- depth. If a dict, it is used as the context directly.
2244
+ depth. If a dict, it is directly used as the context.
2245
+
2233
2246
Notes
2234
2247
-----
2235
2248
We support three types of covariance matrices:
@@ -2493,7 +2506,7 @@ def score(
2493
2506
context : Optional[Union[int, Mapping[str, Any]]], default=0
2494
2507
The context to use for evaluating the formula. If an integer, the
2495
2508
context is taken from the stack frame of the caller at the given
2496
- depth. If a dict, it is used as the context directly .
2509
+ depth. If a dict, it is directly used as the context.
2497
2510
2498
2511
Returns
2499
2512
-------
@@ -3389,7 +3402,7 @@ def fit(
3389
3402
context : Optional[Union[int, Mapping[str, Any]]], default=0
3390
3403
The context to use for evaluating the formula. If an integer, the
3391
3404
context is taken from the stack frame of the caller at the given
3392
- depth. If a dict, it is used as the context directly .
3405
+ depth. If a dict, it is directly used as the context.
3393
3406
3394
3407
weights_sum: float, optional (default=None)
3395
3408
@@ -3708,7 +3721,7 @@ def aic(
3708
3721
context : Optional[Union[int, Mapping[str, Any]]], default=0
3709
3722
The context to use for evaluating the formula. If an integer, the
3710
3723
context is taken from the stack frame of the caller at the given
3711
- depth. If a dict, it is used as the context directly .
3724
+ depth. If a dict, it is directly used as the context.
3712
3725
"""
3713
3726
captured_context = capture_context (
3714
3727
context + 1 if isinstance (context , int ) else context
@@ -3748,7 +3761,7 @@ def aicc(
3748
3761
context : Optional[Union[int, Mapping[str, Any]]], default=0
3749
3762
The context to use for evaluating the formula. If an integer, the
3750
3763
context is taken from the stack frame of the caller at the given
3751
- depth. If a dict, it is used as the context directly .
3764
+ depth. If a dict, it is directly used as the context.
3752
3765
"""
3753
3766
captured_context = capture_context (
3754
3767
context + 1 if isinstance (context , int ) else context
@@ -3792,7 +3805,8 @@ def bic(
3792
3805
context : Optional[Union[int, Mapping[str, Any]]], default=0
3793
3806
The context to use for evaluating the formula. If an integer, the
3794
3807
context is taken from the stack frame of the caller at the given
3795
- depth. If a dict, it is used as the context directly."""
3808
+ depth. If a dict, it is directly used as the context.
3809
+ """
3796
3810
captured_context = capture_context (
3797
3811
context + 1 if isinstance (context , int ) else context
3798
3812
)
0 commit comments