pymc-labs/CausalPy

Remove `InstrumentalVariableRegression.fit` method

Closed this issue · 3 comments

The InstrumentalVariableRegression.fit method overrides the ModelBuilder.fit method, but from what I can see this is unnecessary. And it actually is behind the curve because it doesn't grab the random_seed and provide it to pm.sample_prior_predictive or pm.sample_posterior_predictive.

Obviously check that local tests pass. As of right now we have some issues with doctests, see #323, and I'm actively working on that.

cc @NathanielF

The InstrumentalVariableRegression.fit method overrides ModelBuilder.fit to accommodate the Z dataframe, which is also necessary for the build_model method. Perhaps it would be simpler to just include the random_seed.

Ah I checked to quickly and missed that. Yes, in that case we just need the random seed in there.

Ah I checked to quickly and missed that. Yes, in that case we just need the random seed in there.

Done here.