pymc-labs / pymc-labs/CausalPy

SC: check robustness of results (frequentist)

Open
#45 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
1.2k
Forks
115
Avg merge
6d 1h
Merged PRs (30d)
11

Description

I've experienced clearly sub-optimal weightings when running the the WeightedProportion custom scikit-learn model. It is likely due to bad optimisation, perhaps getting stuck by local optima. So we need to explore the dependence of the results upon w_start.

https://github.com/pymc-labs/CausalPy/blob/815c14c80fa78e1020dd373b07dee93afe100edb/causalpy/skl_models.py#L22-L33

One way to approach making the results more reliable (more likely to represent the global minimum) is to use a particle swarm type approach where we run the optimisation multiple times, each with different w_start.

  • Look into the relevant fitting procedures in scikit-learn.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading causalpy/skl_models.py around lines 22–33 and inspect the relevant scikit-learn fitting procedures. Investigate how results vary with w_start and whether repeated optimization improves reliability; document the findings and the resulting robustness direction.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, scikit-learn
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.