- 
                Notifications
    You must be signed in to change notification settings 
- Fork 85
Draft (new feature) : Model to estimate when a intervention had effect #480
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
          
     Open
      
      
            JeanVanDyk
  wants to merge
  103
  commits into
  pymc-labs:main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
JeanVanDyk:intervention-time-estimator
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
      
        
          +2,234
        
        
          −4
        
        
          
        
      
    
  
  
     Open
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            103 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      10a017e
              
                New feature : Model to estimate when a intervention had effect
              
              
                JeanVanDyk 69d79b3
              
                New feature : Model to estimate when a intervention had effect
              
              
                JeanVanDyk bf4eaaa
              
                Minor fix in docstring
              
              
                JeanVanDyk 3420c9a
              
                Minor fix in docstring
              
              
                JeanVanDyk 3dc23b3
              
                Minor fix in docstring
              
              
                JeanVanDyk d739b4a
              
                Minor fix in docstring
              
              
                JeanVanDyk d48f0c3
              
                Minor fix in docstring
              
              
                JeanVanDyk 14afe09
              
                Minor fix in docstring
              
              
                JeanVanDyk 60357a5
              
                Minor fix in docstring
              
              
                JeanVanDyk 7f57b13
              
                Minor fix in docstring
              
              
                JeanVanDyk 2cb92fc
              
                Minor fix in docstring
              
              
                JeanVanDyk d9c06ac
              
                Minor fix in docstring
              
              
                JeanVanDyk 52cc0fa
              
                Minor fix in docstring
              
              
                JeanVanDyk faf085b
              
                Minor fix in docstring
              
              
                JeanVanDyk cc9a1f4
              
                Minor fix in docstring
              
              
                JeanVanDyk dea9d6e
              
                Minor fix in docstring
              
              
                JeanVanDyk 5e9cde6
              
                fix : hiding progressbar
              
              
                JeanVanDyk ee701f2
              
                Enhancement : Adding the possibility for the user to indicate priors …
              
              
                JeanVanDyk 5ee3cb4
              
                Minor fix in docstring
              
              
                JeanVanDyk 08c520c
              
                updating example notebook
              
              
                JeanVanDyk b1681da
              
                updating example notebook
              
              
                JeanVanDyk fcfd059
              
                Supporting Date format and adding exceptions for model related issues
              
              
                JeanVanDyk 64c97b7
              
                changing column index restriction to label restriction
              
              
                JeanVanDyk 2996331
              
                codespell
              
              
                JeanVanDyk 1da80fd
              
                resolved merge
              
              
                JeanVanDyk 020f679
              
                fixing merging issues
              
              
                JeanVanDyk 5039fda
              
                fixing merging issues
              
              
                JeanVanDyk 4761b7e
              
                codespell
              
              
                JeanVanDyk bec5cd8
              
                codespell
              
              
                JeanVanDyk 2d4d158
              
                updating notebook
              
              
                JeanVanDyk 8d607b8
              
                updating notebook with examples and adding time_variable_name parameter
              
              
                JeanVanDyk d00f828
              
                Merge branch 'main' into pr/480
              
              
                drbenvincent 942a1d5
              
                fixing example
              
              
                JeanVanDyk 4aef14b
              
                revert changes in docs and fixing issues
              
              
                JeanVanDyk 2b2cbdf
              
                Removing the overriding of fit and calculate_impact, adding a test an…
              
              
                JeanVanDyk 6769aa7
              
                Using all samples for uncertainty
              
              
                JeanVanDyk 692d85c
              
                uml and docs
              
              
                JeanVanDyk cc0979e
              
                Changig Handler's name
              
              
                JeanVanDyk 72ebb8d
              
                Adding the abstract class
              
              
                JeanVanDyk d0f4a58
              
                Updating the notebook
              
              
                JeanVanDyk 411aac7
              
                Updating treatment type effect input
              
              
                JeanVanDyk 59db689
              
                Updating integration test
              
              
                JeanVanDyk 4a10196
              
                updating doctest
              
              
                JeanVanDyk 6de9707
              
                Removing time variable
              
              
                JeanVanDyk db8051f
              
                Updating integration test
              
              
                JeanVanDyk 101d62a
              
                Updating integration test to meet coverage reco
              
              
                JeanVanDyk 950623c
              
                Updating notebook
              
              
                JeanVanDyk 5c4eb13
              
                Updating integration test
              
              
                JeanVanDyk 6b1552a
              
                typo
              
              
                JeanVanDyk 3ec5d69
              
                updating notebook
              
              
                JeanVanDyk ead382a
              
                resolving conflicts
              
              
                JeanVanDyk fd78418
              
                resolving conflicts
              
              
                JeanVanDyk 1e5670b
              
                resolving conflicts
              
              
                JeanVanDyk 0b669c9
              
                resolving conflicts
              
              
                JeanVanDyk 3a693a1
              
                resolving conflicts
              
              
                JeanVanDyk 42a7d1b
              
                resolving conflicts
              
              
                JeanVanDyk 70c3426
              
                resolving conflicts
              
              
                JeanVanDyk e7b089a
              
                resolving conflicts
              
              
                JeanVanDyk eef8acb
              
                resolving conflicts
              
              
                JeanVanDyk 9370efe
              
                resolving conflicts
              
              
                JeanVanDyk 0c55851
              
                resolving conflicts
              
              
                JeanVanDyk f1a6622
              
                resolving conflicts
              
              
                JeanVanDyk d681a43
              
                resolving conflicts
              
              
                JeanVanDyk 8b93362
              
                resolving conflicts
              
              
                JeanVanDyk 67d696e
              
                resolving conflicts
              
              
                JeanVanDyk 082d4d5
              
                resolving conflicts
              
              
                JeanVanDyk 0a1b01e
              
                resolving conflicts
              
              
                JeanVanDyk c1fd388
              
                resolving conflicts
              
              
                JeanVanDyk d009b15
              
                resolving conflicts
              
              
                JeanVanDyk 701fe13
              
                resolving conflicts
              
              
                JeanVanDyk 46b453f
              
                resolving conflicts
              
              
                JeanVanDyk 5318add
              
                resolving conflicts
              
              
                JeanVanDyk 47cf44e
              
                resolving conflicts
              
              
                JeanVanDyk 9bbc4cb
              
                resolving conflicts
              
              
                JeanVanDyk cf2a6f7
              
                resolving conflicts
              
              
                JeanVanDyk e5ee32c
              
                resolve conflicts
              
              
                JeanVanDyk 7da8f91
              
                removing errors in the notebook
              
              
                JeanVanDyk c535061
              
                Adding plot forest and comments to better compare models with and wit…
              
              
                JeanVanDyk 812cd4b
              
                Adding mathjax formulas for examples
              
              
                JeanVanDyk 704066d
              
                Typo
              
              
                JeanVanDyk 08463b5
              
                Changing variables name in preprocessing
              
              
                JeanVanDyk 837e670
              
                improving docstring
              
              
                JeanVanDyk 049c21b
              
                adding references
              
              
                JeanVanDyk cd51404
              
                refining notebook
              
              
                JeanVanDyk 07ce191
              
                adding ; after plots
              
              
                JeanVanDyk 7315283
              
                small docstring update
              
              
                drbenvincent bae5a12
              
                add developer focussed module level docstring for ITS
              
              
                drbenvincent 7a0ae15
              
                resolving conflicts
              
              
                JeanVanDyk 51eb6b2
              
                ruff format
              
              
                JeanVanDyk c1dfd90
              
                Reducing size of the file
              
              
                JeanVanDyk 38d5f12
              
                Updating doctest
              
              
                JeanVanDyk e96e7b9
              
                Updating doctest
              
              
                JeanVanDyk cdfd8e1
              
                Updating doctest
              
              
                JeanVanDyk 2230338
              
                Updating doctest
              
              
                JeanVanDyk e5f13ab
              
                Restore intterupte_time_series.py to its original version
              
              
                JeanVanDyk 76ef685
              
                Restore intterupte_time_series.py to its original version
              
              
                JeanVanDyk c84edf4
              
                Adding a test ton ensure an exception is raised when len(time_range) …
              
              
                JeanVanDyk d7a0157
              
                Adding a test ton ensure an exception is raised when len(time_range) …
              
              
                JeanVanDyk f82d7d3
              
                Adding a test ton ensure an exception is raised when len(time_range) …
              
              
                JeanVanDyk 9166e29
              
                Adding a test ton ensure an exception is raised when when type(data.i…
              
              
                JeanVanDyk 4211ddc
              
                Adding a test ton ensure an exception is raised when len(time_range) …
              
              
                JeanVanDyk b9c3a97
              
                Using Priors from Pymc-experimental for the cp_param_effects
              
              
                JeanVanDyk a6573ef
              
                Adding Priors from experimental
              
              
                JeanVanDyk File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              Empty file.
          
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
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.
Some error? What's the value of the specific error class if it's quite unspecific?
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.
I tried to follow the approach used in the input_validation method. I noticed they relied on custom exceptions, so I figured that since none of the existing exceptions fit the issue I wanted to raise, it made sense to create my own, following the same pattern.
The idea is that someone might want to provide their own PyMC model for changepoint detection. Since the handler calls set_time_range during data preprocessing, it seems reasonable to require that user-provided models implement a set_time_range method.
Do you think it would be in fact just cleaner to remove it ?
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.
No, it's fine. I guess the docstring just threw me a bit, seemed redundant, but i get the idea of it.