-
-
Notifications
You must be signed in to change notification settings - Fork 26.1k
TST use global_random_seed in sklearn/linear_model/tests/test_logistic.py
#31362
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
base: main
Are you sure you want to change the base?
Conversation
@DeaMariaLeon Please note that |
Thank you so much @lorentzenchr! |
@@ -254,13 +253,16 @@ def test_elasticnet_l1_ratio_err_helpful(LR): | |||
# TODO(1.8): remove whole test with deprecation of multi_class | |||
@pytest.mark.filterwarnings("ignore:.*'multi_class' was deprecated.*:FutureWarning") | |||
@pytest.mark.parametrize("solver", ["lbfgs", "newton-cg", "sag", "saga"]) | |||
def test_multinomial_binary(solver): | |||
def test_multinomial_binary(global_random_seed, solver): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this test doesn't need global_random_seed as it will be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove test now (Guillaume's suggestion)
test_predict_2_classes test_logistic_cv_mock_scorer test_predict_iris test_sparsify test_write_parameters test_consistency_path test_liblinear_dual_random_state test_logistic_cv test_logistic_cv_multinomial_score test_multinomial_logistic_regression_string_inputs test_logistic_cv_sparse test_logistic_regression_solvers test_logistic_regression_solvers_multiclass test_logistic_regression_solvers_multiclass_unpenalized test_logistic_regression_class_weights test_logistic_regression_multinomial test_liblinear_decision_function_zero test_liblinear_logregcv_sparse test_saga_sparse test_logreg_l1 test_logreg_l1_sparse_data test_logistic_regression_cv_refit test_logreg_predict_proba_multinomial test_max_iter test_warm_start test_saga_vs_liblinear test_dtype_match test_warm_start_converge_LR test_elastic_net_coeffs test_elastic_net_l1_l2_equivalence test_elastic_net_versus_sgd test_penalty_none test_scores_attribute_layout_elasticnet test_multinomial_identifiability_on_iris test_sample_weight_not_modified test_liblinear_not_stuck test_lr_cv_scores_differ_when_sample_weight_is_requested test_passing_params_without_enabling_metadata_routing
Still need to fix these: I removed some tests after conversation with Guillaume - but I hope that's what he meant. |
test_logistic_cv_mock_scorer test_predict_iris test_sparsify test_write_parameters test_consistency_path test_liblinear_dual_random_state test_logistic_cv test_logistic_cv_multinomial_score test_multinomial_logistic_regression_string_inputs test_logistic_cv_sparse test_logistic_regression_solvers test_logistic_regression_solvers_multiclass test_logistic_regression_solvers_multiclass_unpenalized test_logistic_regression_class_weights test_logistic_regression_multinomial test_liblinear_decision_function_zero test_liblinear_logregcv_sparse test_saga_sparse test_logreg_l1 test_logreg_l1_sparse_data test_logistic_regression_cv_refit test_logreg_predict_proba_multinomial test_max_iter test_warm_start test_saga_vs_liblinear test_dtype_match test_warm_start_converge_LR test_elastic_net_coeffs test_elastic_net_l1_l2_equivalence test_elastic_net_versus_sgd test_penalty_none test_scores_attribute_layout_elasticnet test_multinomial_identifiability_on_iris test_sample_weight_not_modified test_liblinear_not_stuck test_lr_cv_scores_differ_when_sample_weight_is_requested test_passing_params_without_enabling_metadata_routing test_LogisticRegression_elastic_net_objective test_LogisticRegressionCV_GridSearchCV_elastic_net
test_predict_2_classes test_logistic_cv_mock_scorer test_predict_iris test_sparsify test_write_parameters test_consistency_path test_liblinear_dual_random_state test_logistic_cv test_logistic_cv_multinomial_score test_multinomial_logistic_regression_string_inputs test_logistic_cv_sparse test_logistic_regression_solvers test_logistic_regression_solvers_multiclass test_logistic_regression_solvers_multiclass_unpenalized test_logistic_regression_class_weights test_logistic_regression_multinomial test_liblinear_decision_function_zero test_liblinear_logregcv_sparse test_saga_sparse test_logreg_l1 test_logreg_l1_sparse_data test_logistic_regression_cv_refit test_logreg_predict_proba_multinomial test_max_iter test_warm_start test_saga_vs_liblinear test_dtype_match test_warm_start_converge_LR test_elastic_net_coeffs test_elastic_net_l1_l2_equivalence test_elastic_net_versus_sgd test_penalty_none test_scores_attribute_layout_elasticnet test_multinomial_identifiability_on_iris test_sample_weight_not_modified test_liblinear_not_stuck test_lr_cv_scores_differ_when_sample_weight_is_requested test_passing_params_without_enabling_metadata_routing test_LogisticRegression_elastic_net_objective test_LogisticRegressionCV_GridSearchCV_elastic_net
test_predict_2_classes test_logistic_cv_mock_scorer test_predict_iris test_sparsify test_write_parameters test_consistency_path test_liblinear_dual_random_state test_logistic_cv test_logistic_cv_multinomial_score test_multinomial_logistic_regression_string_inputs test_logistic_cv_sparse test_logistic_regression_solvers test_logistic_regression_solvers_multiclass test_logistic_regression_solvers_multiclass_unpenalized test_logistic_regression_class_weights test_logistic_regression_multinomial test_liblinear_decision_function_zero test_liblinear_logregcv_sparse test_saga_sparse test_logreg_l1 test_logreg_l1_sparse_data test_logistic_regression_cv_refit test_logreg_predict_proba_multinomial test_max_iter test_warm_start test_saga_vs_liblinear test_dtype_match test_warm_start_converge_LR test_elastic_net_coeffs test_elastic_net_l1_l2_equivalence test_elastic_net_versus_sgd test_penalty_none test_scores_attribute_layout_elasticnet test_multinomial_identifiability_on_iris test_sample_weight_not_modified test_liblinear_not_stuck test_lr_cv_scores_differ_when_sample_weight_is_requested test_passing_params_without_enabling_metadata_routing
Reference Issues/PRs
Towards #22827
What does this implement/fix? Explain your changes.
Any other comments?