SURE-tools 2.1.55__tar.gz → 2.1.56__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of SURE-tools might be problematic. Click here for more details.
- {sure_tools-2.1.55 → sure_tools-2.1.56}/PKG-INFO +1 -1
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE/PerturbFlow.py +14 -14
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE_tools.egg-info/PKG-INFO +1 -1
- {sure_tools-2.1.55 → sure_tools-2.1.56}/setup.py +1 -1
- {sure_tools-2.1.55 → sure_tools-2.1.56}/LICENSE +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/README.md +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE/SURE.py +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE/__init__.py +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE/assembly/__init__.py +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE/assembly/assembly.py +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE/assembly/atlas.py +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE/atac/__init__.py +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE/atac/utils.py +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE/codebook/__init__.py +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE/codebook/codebook.py +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE/flow/__init__.py +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE/flow/flow_stats.py +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE/flow/plot_quiver.py +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE/perturb/__init__.py +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE/perturb/perturb.py +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE/utils/__init__.py +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE/utils/custom_mlp.py +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE/utils/queue.py +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE/utils/utils.py +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE_tools.egg-info/SOURCES.txt +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE_tools.egg-info/dependency_links.txt +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE_tools.egg-info/entry_points.txt +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE_tools.egg-info/requires.txt +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/SURE_tools.egg-info/top_level.txt +0 -0
- {sure_tools-2.1.55 → sure_tools-2.1.56}/setup.cfg +0 -0
|
@@ -244,7 +244,7 @@ class PerturbFlow(nn.Module):
|
|
|
244
244
|
# allow_broadcast=self.allow_broadcast,
|
|
245
245
|
# use_cuda=self.use_cuda,
|
|
246
246
|
# )
|
|
247
|
-
self.encoder_concentrate = self.decoder_concentrate
|
|
247
|
+
#self.encoder_concentrate = self.decoder_concentrate
|
|
248
248
|
else:
|
|
249
249
|
self.decoder_concentrate = MLP(
|
|
250
250
|
[self.latent_dim] + self.decoder_hidden_layers + [self.input_size],
|
|
@@ -417,9 +417,9 @@ class PerturbFlow(nn.Module):
|
|
|
417
417
|
alpha = self.encoder_n(zns)
|
|
418
418
|
ns = pyro.sample('n', dist.OneHotCategorical(logits=alpha))
|
|
419
419
|
|
|
420
|
-
if self.loss_func == 'gamma-poisson':
|
|
421
|
-
|
|
422
|
-
|
|
420
|
+
#if self.loss_func == 'gamma-poisson':
|
|
421
|
+
# con_alpha,con_beta = self.encoder_concentrate(zns)
|
|
422
|
+
# rate = pyro.sample('cs', dist.Gamma(con_alpha, con_beta).to_event(1))
|
|
423
423
|
|
|
424
424
|
def model2(self, xs, us=None):
|
|
425
425
|
pyro.module('PerturbFlow', self)
|
|
@@ -521,9 +521,9 @@ class PerturbFlow(nn.Module):
|
|
|
521
521
|
alpha = self.encoder_n(zns)
|
|
522
522
|
ns = pyro.sample('n', dist.OneHotCategorical(logits=alpha))
|
|
523
523
|
|
|
524
|
-
if self.loss_func == 'gamma-poisson':
|
|
525
|
-
|
|
526
|
-
|
|
524
|
+
#if self.loss_func == 'gamma-poisson':
|
|
525
|
+
# con_alpha,con_beta = self.encoder_concentrate(zns)
|
|
526
|
+
# rate = pyro.sample('cs', dist.Gamma(con_alpha, con_beta).to_event(1))
|
|
527
527
|
|
|
528
528
|
def model3(self, xs, ys, embeds=None):
|
|
529
529
|
pyro.module('PerturbFlow', self)
|
|
@@ -631,9 +631,9 @@ class PerturbFlow(nn.Module):
|
|
|
631
631
|
else:
|
|
632
632
|
zns = embeds
|
|
633
633
|
|
|
634
|
-
if self.loss_func == 'gamma-poisson':
|
|
635
|
-
|
|
636
|
-
|
|
634
|
+
#if self.loss_func == 'gamma-poisson':
|
|
635
|
+
# con_alpha,con_beta = self.encoder_concentrate(zns)
|
|
636
|
+
# rate = pyro.sample('cs', dist.Gamma(con_alpha, con_beta).to_event(1))
|
|
637
637
|
|
|
638
638
|
def model4(self, xs, us, ys, embeds=None):
|
|
639
639
|
pyro.module('PerturbFlow', self)
|
|
@@ -751,9 +751,9 @@ class PerturbFlow(nn.Module):
|
|
|
751
751
|
else:
|
|
752
752
|
zns = embeds
|
|
753
753
|
|
|
754
|
-
if self.loss_func == 'gamma-poisson':
|
|
755
|
-
|
|
756
|
-
|
|
754
|
+
#if self.loss_func == 'gamma-poisson':
|
|
755
|
+
# con_alpha,con_beta = self.encoder_concentrate(zns)
|
|
756
|
+
# rate = pyro.sample('cs', dist.Gamma(con_alpha, con_beta).to_event(1))
|
|
757
757
|
|
|
758
758
|
def _total_effects(self, zns, us):
|
|
759
759
|
zus = None
|
|
@@ -933,7 +933,7 @@ class PerturbFlow(nn.Module):
|
|
|
933
933
|
|
|
934
934
|
def _get_expression_response(self, delta_zs):
|
|
935
935
|
if self.loss_func == 'gamma-poisson':
|
|
936
|
-
alpha,beta = self.
|
|
936
|
+
alpha,beta = self.decoder_concentrate(delta_zs)
|
|
937
937
|
xs = dist.Gamma(alpha,beta).to_event(1).mean
|
|
938
938
|
else:
|
|
939
939
|
xs = self.decoder_concentrate(delta_zs)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|