Comments (3)
Hi Winston, not a bug 🙃 🐞
The equation you presented is limited to binary treatment scenarios, while causallib
's implementation scales to arbitrary number of treatment values.
Reformulating your equation in the binary case, treated observations (
Causallib's implementation tries to make the most generalized calculation by first considering for each probabilities
matrix, which is similar to the output of a predict_proba()
), and only slicing for the required values according to the treatment assignment at the very end.
Thanks for bringing this up, and sorry for causing any confusion. I hope I was able to clear some of it up.
Please feel free if there's anything else.
from causallib.
To justify this further. There are other small benefits to this implementation that I have yet to seize.
For example, generalizing the average treatment effect on the treated/controls (ATT/ATC) to any arbitrary treatment level v
can be simply done by multiplying the inverse probability matrix (weight_matrix
) by the corresponding probability column: weight_matrix *= probabilities[v]
. Then the column corresponding to v
is all ones (v
.
I hope this gives better context to the design decisions.
from causallib.
I see. You turn the binary one-class label to a multi-class label first. That works. Thanks.
from causallib.
Related Issues (18)
- PyPi package fails to install and run HOT 6
- Misstatement in Standardization example HOT 2
- weight matrix in IPW calculation can have weights info due to division by zero HOT 2
- ModuleNotFoundError: No module named 'causallib.contrib.hemm' HOT 2
- Weights_distribution plot sometimes fails due to color specification HOT 1
- ImportError: cannot import name 'PropensityEvaluator' from 'causallib.estimation' HOT 2
- Matching more neighbors than the number of examples in the treatment group HOT 2
- 'module' object is not callable HOT 8
- Error in Example "causal_simulator.ipynb" HOT 2
- The parameter 'std' keeps decreasing HOT 4
- Issues with Categorical Data HOT 3
- Fix support for scikit-learn>=1.2.0 and Numpy=1.24.0 HOT 1
- Use case for categorical datasets HOT 5
- ipw.estimate_population_outcome(Data_X, Data_a, Data_y) has some error. HOT 2
- Installation for Python version 3.11 HOT 4
- Description for each variable HOT 1
- IPW weights bug. Missuse of np.average rather than mean of weighted outcomes HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from causallib.