Questions tagged [causalml]

15 questions
4
votes
0 answers

'ValueError: numpy.ndarray size changed, may indicate binary incompatibility' - but 2nd attempt succeeds

I am getting the following error when I deserialize a causalml (0.10.0) model in linux (x86-64), that has been serialized on os-x (darwin): ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Unexpectedly, trying to…
gerben
  • 692
  • 4
  • 16
3
votes
1 answer

Error when Identifying Effects of Causal Model

I am trying to use the CausalModel and Econml libraries in order to determine the effect of a variable on different scenarios displayed in the dataset below : So firstly, I import the following libraries : import pandas as pd import econml import…
3
votes
0 answers

Issue with installing causalml package python

I am trying to install the package causalml in Jupyter using pip, and I get the following error: ERROR: Command errored out with exit status 1: command: /opt/conda/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] =…
Aditya Lahiri
  • 409
  • 3
  • 11
2
votes
0 answers

predict conditional mean of one potential outcome in causal forest?

I fit a causal_forest() and used predict() to get estimates of tau(X) = E[Y(1) - Y(0) | X]. How can I get estimates of E[Y(0) | X] alone ? Thank you !
Shira
  • 119
  • 5
2
votes
1 answer

Causal Inference where the treatment assignment is randomised

I have mostly worked with Observational data where the treatment assignment was not randomized. In the past, I have used PSM, IPTW to balance and then calculate ATE. My problem is: Now I am working on a problem where the treatment assignment is…
manish Prasad
  • 636
  • 6
  • 16
1
vote
1 answer

Is using causal convolution / padding equivalent to shifting the outputs back?

I'm having some trouble understanding the purpose of causal convolutions. Suppose I'm doing time-series classification using a convolutional network with 1 layer and kernel=2, stride=1, dilation=0. Isn't it the same thing as shifting my output back…
1
vote
2 answers

Presenting effect modification in causal graphs

I am quite new to causal inference and want to try some methods for treatment effect estimation. For this purpose, I created a the following data generation process in Python: import numpy as np n = 10000 X3 = np.random.randint(1,4, n) X2 =…
terra_cau
  • 11
  • 1
1
vote
1 answer

simulating data with bayesian network in R using own specification

Say I have a simple DAG representing a confounding variable X = Smoking, a treatment T and outcome Y = Death such that: T ~ X Y ~ T + X Is it possible to produce a synthetic dataset of say 1m observations that follows some specified conditional…
chrisjacques
  • 635
  • 1
  • 5
  • 17
1
vote
1 answer

causalml package: can the random forest handle continuous response variable?

There is a package for Python called causalml which can be used for uplift modeling. I'm trying to model the uplift when the response variable is continuous. The decision tree module in this package does not work on a continuous response variable,…
Slouei
  • 716
  • 7
  • 19
0
votes
0 answers

cannot run 'from causalml.inference.tree import UpliftTreeClassifier, UpliftRandomForestClassifier'

Hey I am using causalml package. but I cannot load from causalml.inference.tree import UpliftTreeClassifier, UpliftRandomForestClassifier or this line from causalml.dataset import make_uplift_classification The error I got was the same ValueError:…
Xixi
  • 117
  • 6
0
votes
0 answers

How can I apply SHAP on a 3D dataset and LSTM model?

I trained an LSTM model on a 3D dataset and now I’m trying to apply SHAP on the model and the dataset to obtain more advanced insights. I made a lot of tests with all SHAP features but it seems no one support LSTM with 3D datasets. Is there a way to…
SARAB
  • 9
  • 1
0
votes
0 answers

Problem with installing the causalml library

I am trying to install causalml package both using pip and from source following these instructions: https://causalml.readthedocs.io/en/latest/installation.html Unfortunately I cannot succeed with building wheel for causalml: ERROR:Failed building…
MateuszW
  • 9
  • 2
0
votes
1 answer

Showing strength of dependency in DAG (causal inference)

I'm using DAG for causal inference, the code is written in python. But when I obtain data by implementing GOLEM or IACLiNGAM I wish also to see the strength of the dependency on the graph. Is it possible to somehow evaluate or show that? Or maybe…
Egorsky
  • 179
  • 1
  • 11
0
votes
1 answer

Is there a way a save plot generated by causalimpact in python?

Below is the sample code import pandas as pd from causalimpact import CausalImpact data = pd.read_csv('https://raw.githubusercontent.com/WillianFuks/tfcausalimpact/master/tests/fixtures/arma_data.csv')[['y', 'X']] data.iloc[70:, 0] += 5 pre_period…
0
votes
1 answer

Bayesian network for continuous variables

I have search and saw some questions on the matter but without answer (due to the fact that the questions were asked more than 1 year ago, I. hoped something has changed) I am looking for a library to infer bayesian network from a file of continious…