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

test: post regression tests #70

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

felipehuerta17
Copy link
Contributor

@felipehuerta17 felipehuerta17 commented Apr 22, 2020

I began the creation of tests for the confidence interval routines.

Note that this branch is branched from the PR #69, so it depends on merging that one.

We could potentially spend our whole life thinking on tests for confidence intervals so I am trying to write the most typical ones, such as providing incorrect inputs, not initializing the model or not fitting the model prior calling confidence intervals.

Still work in progress but some significant progress has been made. I am aware that this will require some rebase and so on.

Update 13/07/2020

The tests are now adequate to the latest version of open-sir!

@jia200x
Copy link
Contributor

jia200x commented Apr 23, 2020

it looks great! I will hurry up with #69

@jia200x
Copy link
Contributor

jia200x commented Apr 23, 2020

#69 was merged :)

Please rebase against master.

Tip: Since only the last commit is needed here, I sugges to rebase using interactive mode (git rebase -i BASE) and drop all commits except the last

EDIT: If master is already up to date, git rebase -i master would do the trick

@felipehuerta17 felipehuerta17 force-pushed the pr/post_reg_tests branch 2 times, most recently from 4de3cf5 to b71e682 Compare April 26, 2020 09:24
@felipehuerta17 felipehuerta17 added the blocked Used to block a PR from being merged into master or develop when something is still missing label Apr 26, 2020
@jia200x
Copy link
Contributor

jia200x commented May 2, 2020

Is there a new dependency here with #77 or this one should be merged first?

@felipehuerta17
Copy link
Contributor Author

felipehuerta17 commented May 3, 2020

This depends on #77 and #78

@sasalatart sasalatart removed their request for review May 28, 2020 02:14
Creates a number of tests for input and model initialization
validation to use confidence_intervals. As this is a function
that requires a sequence of steps to be performed before, it is
highly error prone and I think it is good to spend time developing
tests for it as it bad use can produce misleading conclusions
@felipehuerta17 felipehuerta17 changed the title [WIP] test: post regression tests test: post regression tests Jul 13, 2020
@felipehuerta17 felipehuerta17 removed the blocked Used to block a PR from being merged into master or develop when something is still missing label Jul 13, 2020
@felipehuerta17 felipehuerta17 added this to the Release 1.0.0 milestone Jul 13, 2020
Copy link
Contributor

@sasalatart sasalatart left a comment

Choose a reason for hiding this comment

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

But left some minor comments

@@ -144,6 +144,21 @@ def rolling_avg(x_list):
class ConfidenceIntervalsMixin:
""" Mixin with confidence interval definitions """

def is_initialized(self):
""" Checks that the model is initialized and fitted before calling
any postprocessing rotuine"""
Copy link
Contributor

Choose a reason for hiding this comment

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

Routine?

instance before calculating confidence intervals"
)

if (self.p is None) | (self.w0 is None):
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be an || instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe an or would be even better

# ci_bootstrap
def test_ci_without_model_init(self, model):
""" Tests that an error is raised if the ci routines
are from an model instance that doesn't have initialized
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
are from an model instance that doesn't have initialized
are from a model instance that has not initialized

are from an model instance that doesn't have initialized
it parameters or initial conditions"""

# model.is_fitted = True
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we remove this comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! will implement the updates today

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.

None yet

3 participants