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 Monte Carlo Least Core error when n_iterations < len(dataset) #281

Merged

Conversation

AnesBenmerzoug
Copy link
Collaborator

@AnesBenmerzoug AnesBenmerzoug commented Feb 25, 2023

Description

This PR closes #251

Changes

  • Prints a warning instead of raising an error when n_iterations < len(dataset) in Monte Carlo Least Core.
  • Moved montecarlo_least_core higher in the module for readability.
  • Removed test that is no longer needed.

Checklist

  • Wrote Unit tests (if necessary)
  • Updated Documentation (if necessary)
  • Updated Changelog
  • If notebooks were added/changed, added boilerplate cells are tagged with "nbsphinx":"hidden"

@AnesBenmerzoug AnesBenmerzoug self-assigned this Feb 25, 2023
Copy link
Collaborator

@mdbenito mdbenito left a comment

Choose a reason for hiding this comment

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

lgtm, but looking at this, the name n_iterations doesn't really make much sense, does it? It's the number of constraints used in the problem. Before, it made sense to use n_iterations everywhere for consistency, but now the main MC methods use StoppingCriterion. And since LC and GT need a dedicated parameter, which in both cases is a number of constraints or samples to take, maybe we should change the name to be n_samples or n_constraints in both. (?)

CHANGELOG.md Outdated Show resolved Hide resolved
@AnesBenmerzoug
Copy link
Collaborator Author

I wanted to tackle the issue of consistency in the argument names in another issue.

I think we have to agree first on what to use and then document it before making changes.

@mdbenito
Copy link
Collaborator

mdbenito commented Mar 1, 2023

I wanted to tackle the issue of consistency in the argument names in another issue.

Created #295

@mdbenito mdbenito merged commit c674f3c into develop Mar 1, 2023
@mdbenito mdbenito deleted the 251-monte-carlo-least-core-raises-error-n-iterations branch March 1, 2023 09:27
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.

Monte Carlo Least Core raises an error when n_iterations < len(dataset)
2 participants