Skip to content

Conversation

drbenvincent
Copy link
Collaborator

@drbenvincent drbenvincent commented Jul 19, 2025

Closes #433

P.S.: In the same function, should the input intercept (i.e. beta_intercept) in the output dataframe instead of the constant 1

I believe the answer to this is "no". The beta_intercept input is being used in the data generation process, but the purpose of df["intercept"] = np.ones(df.shape[0]) is to create input data for modelling where it's common to create a column of zeros. Though practically I think this is not needed or is even being used because it's being taken care of by patsy based on the user-provided model formula. But for the moment I've just added an explanatory comment.


📚 Documentation preview 📚: https://causalpy--505.org.readthedocs.build/en/505/

@drbenvincent drbenvincent requested a review from juanitorduz July 19, 2025 07:06
@drbenvincent drbenvincent changed the title Fixe to minor bug in simulated data generation function Fix to minor bug in simulated data generation function Jul 19, 2025
Copy link

codecov bot commented Jul 19, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@b63860d). Learn more about missing BASE report.
⚠️ Report is 54 commits behind head on main.

Files with missing lines Patch % Lines
causalpy/data/simulate_data.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #505   +/-   ##
=======================================
  Coverage        ?   95.13%           
=======================================
  Files           ?       28           
  Lines           ?     2384           
  Branches        ?        0           
=======================================
  Hits            ?     2268           
  Misses          ?      116           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@drbenvincent drbenvincent requested a review from ErikRingen July 25, 2025 13:38
Copy link

@ErikRingen ErikRingen left a comment

Choose a reason for hiding this comment

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

LGTM

@drbenvincent drbenvincent added the bug Something isn't working label Jul 29, 2025
@drbenvincent drbenvincent merged commit 09adfd7 into main Jul 29, 2025
10 checks passed
@drbenvincent drbenvincent deleted the gen-time-series-data branch July 29, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The argument N is partially ignored in causalpy.data.simulate_data.generate_time_series_data

2 participants