@@ -137,7 +137,7 @@ def _run(self, X, A, w_init=None, is_train=True, use_stabilized=None, **select_k
137
137
if not np .all (unique_treatments == np .arange (n_treatments )):
138
138
raise AssertionError ("Treatment values in `a` must be indexed 0, 1, 2, ..." )
139
139
self .iterative_models_ = np .empty ((n_treatments , self .iterations ), dtype = object )
140
- self .iterative_normalizing_consts_ = np .full ((n_treatments , self .iterations ), np .NaN )
140
+ self .iterative_normalizing_consts_ = np .full ((n_treatments , self .iterations ), np .nan )
141
141
142
142
self .discriminator_loss_ = np .zeros ((n_treatments , self .iterations ))
143
143
self .treatments_frequency_ = _compute_treatments_frequency (A )
@@ -147,7 +147,7 @@ def _run(self, X, A, w_init=None, is_train=True, use_stabilized=None, **select_k
147
147
# population ("source population"),
148
148
# and the samples with label -1 are the population under treatment a ("target population").
149
149
# Labels 1 and -1 (rather than 0) are used because of the later exponential loss function
150
- X_augm = np .row_stack ((X , X [A == a ])) # create the augmented dataset
150
+ X_augm = np .vstack ((X , X [A == a ])) # create the augmented dataset
151
151
y = np .ones ((X_augm .shape [0 ]))
152
152
y [X .shape [0 ]:] *= - 1 # subpopulation of current treatment (a) has y== -1
153
153
target_pop_mask = y == - 1
0 commit comments