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

Better tests for l2 alpha scaling between different sklearn estimators #17

Merged
merged 8 commits into from
Feb 25, 2025

Conversation

pierrenodet
Copy link
Collaborator

Hope the new tests in test_linear.py will be enough

coef,
intercept,
loss=loss,
regul=estimator.alpha * batch_size / X.shape[0],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol wtf ? Do we inherit this from sklearn's black magic ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes :(

@@ -25,23 +25,25 @@
from sklearn.metrics import log_loss, mean_squared_error
from sklearn.model_selection import LeaveOneOut
from sklearn.preprocessing import LabelBinarizer, StandardScaler
from statsmodels.genmod import families
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it be added somewhere in the config files as a required dependency for testing ?

Copy link
Collaborator Author

@pierrenodet pierrenodet Feb 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's written in the pyproject.toml, when running hatch test, it's going to download additional test-time dependencies. It's done in a hatch centric way, for a more generic way we could introduce a dependency-group https://docs.astral.sh/uv/concepts/projects/dependencies/#development-dependencies

Base automatically changed from check-grad-hess to master February 24, 2025 23:48
@pierrenodet pierrenodet merged commit 6bb8e8b into master Feb 25, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants