diff --git a/src/tranquilo/handle_infinity.py b/src/tranquilo/handle_infinity.py index c250b64..fd594a3 100644 --- a/src/tranquilo/handle_infinity.py +++ b/src/tranquilo/handle_infinity.py @@ -33,7 +33,7 @@ def clip_relative(fvecs): # Due to the initial value of the masked min and max, the sign of the diff can # be negative if all values are infinite. In that case we want to switch the - # signe of _diff, _mins and _maxs. + # sign of _diff, _mins and _maxs. _signs = np.sign(_diff) _diff *= _signs _maxs *= _signs diff --git a/src/tranquilo/rho_noise.py b/src/tranquilo/rho_noise.py index e9d76e4..eeea48e 100644 --- a/src/tranquilo/rho_noise.py +++ b/src/tranquilo/rho_noise.py @@ -15,7 +15,8 @@ def simulate_rho_noise( rng, options, ): - """Simulate a rho that would obtain on average if there is no approximation error. + """Simulate a rho that we would obtain on average if there is no approximation + error. This can be used to adjust the sample size in the presence of noise. diff --git a/tests/test_fit_models.py b/tests/test_fit_models.py index 9408ee5..83d1e0d 100644 --- a/tests/test_fit_models.py +++ b/tests/test_fit_models.py @@ -94,14 +94,14 @@ def test_fit_against_truth_quadratic(fitter, quadratic_case): @pytest.mark.parametrize("model", ["ols", "ridge", "tranquilo"]) def test_fit_ols_against_gradient(model, quadratic_case): options = {"l2_penalty_square": 0} - fit_ols = get_fitter( + fitter = get_fitter( model, options, model_type="quadratic", residualize=False, infinity_handling="relative", ) - got = fit_ols( + got = fitter( quadratic_case["x"], quadratic_case["y"], region=Region(center=np.zeros(4), radius=1.0),