I'm trying to create an IPW model with a base model of MLP, yet from one run to another, all the propensity scores for each row in the dataFrame are distributed differently.
Could you please help me understand this behaviour? and why it doesn't happen when using a base model of logsitic regression for such task?
Thanks in advance!
EDIT:
from causallib.datasets import load_nhefs
from causallib.estimation import IPW
from causallib.evaluation import PropensityEvaluator
from sklearn.linear_model import LogisticRegression
from sklearn.neural_network import MLPClassifier
data = load_nhefs()
data.X.join(data.a).join(data.y).head()
learner = MLPClassifier()
ipw = IPW(learner)
ipw.fit(data.X, data.a)
effect = ipw.estimate_effect(outcomes[1], outcomes[0])
This is an example of my usage from the example found here: https://github.com/IBM/causallib/blob/master/examples/ipw.ipynb
sklearnproduces different sets of predicted probabilities when run multiple times. Is that correct? If so, everything about IPW is a distraction and will make it harder to answer your question. That's why I keep pressing you on this. My guess is that MLP simply has a stochastic component and logistic regression doesn't, but hopefully an MLP expert will weigh in, which is why I added the [tag:neural-networks] tag. No knowledge of propensity scores or IPW (which is what I do know about) will help answer this. – Noah Jun 14 '22 at 17:54