Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos. #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/tranquilo/handle_infinity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/tranquilo/rho_noise.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions tests/test_fit_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down