SURE-tools 1.0.4__py3-none-any.whl → 1.0.6__py3-none-any.whl

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/SURE.py CHANGED
@@ -369,7 +369,7 @@ class SURE(nn.Module):
369
369
  log_theta = concentrate
370
370
  else:
371
371
  rate = concentrate.exp()
372
- if self.loss_func == 'negbinomial':
372
+ if self.loss_func != 'poisson':
373
373
  theta = dist.DirichletMultinomial(total_count=1, concentration=rate).mean
374
374
 
375
375
  if self.loss_func == 'negbinomial':
@@ -451,7 +451,7 @@ class SURE(nn.Module):
451
451
  log_theta = concentrate
452
452
  else:
453
453
  rate = concentrate.exp()
454
- if self.loss_func == 'negbinomial':
454
+ if self.loss_func != 'poisson':
455
455
  theta = dist.DirichletMultinomial(total_count=1, concentration=rate).mean
456
456
 
457
457
  if self.loss_func == 'negbinomial':
@@ -545,7 +545,7 @@ class SURE(nn.Module):
545
545
  log_theta = concentrate
546
546
  else:
547
547
  rate = concentrate.exp()
548
- if self.loss_func == 'negbinomial':
548
+ if self.loss_func != 'poisson':
549
549
  theta = dist.DirichletMultinomial(total_count=1, concentration=rate).mean
550
550
 
551
551
  if self.loss_func == 'negbinomial':
@@ -641,7 +641,7 @@ class SURE(nn.Module):
641
641
  log_theta = concentrate
642
642
  else:
643
643
  rate = concentrate.exp()
644
- if self.loss_func == 'negbinomial':
644
+ if self.loss_func != 'poisson':
645
645
  theta = dist.DirichletMultinomial(total_count=1, concentration=rate).mean
646
646
 
647
647
  if self.loss_func == 'negbinomial':
@@ -931,13 +931,6 @@ class SURE(nn.Module):
931
931
  # Update progress bar
932
932
  pbar.set_postfix({'loss': str_loss})
933
933
  pbar.update(1)
934
-
935
- assigns = self.soft_assignments(xs)
936
- assigns = convert_to_tensor(assigns, dtype=self.dtype, device=self.get_device())
937
- self.codebook_weights = torch.sum(assigns, dim=0)
938
- self.codebook_weights = self.codebook_weights / torch.sum(self.codebook_weights)
939
- #self.inverse_dispersion = pyro.param('inverse_dispersion').item()
940
- #self.dof = pyro.param('dof').item()
941
934
 
942
935
  @classmethod
943
936
  def save_model(cls, model, file_path, compression=False):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SURE-tools
3
- Version: 1.0.4
3
+ Version: 1.0.6
4
4
  Summary: Succinct Representation of Single Cells
5
5
  Home-page: https://github.com/ZengFLab/SURE
6
6
  Author: Feng Zeng
@@ -1,4 +1,4 @@
1
- SURE/SURE.py,sha256=YhsWt3ndKpiIngKTjKOt58_jNyaBDF0wsoeIVNg2Di0,48758
1
+ SURE/SURE.py,sha256=bDDt7dsacB9mnbUuCvr_QWtexh_Gb3roGziHvYM31Mg,48333
2
2
  SURE/__init__.py,sha256=SbIRwAVBnNhza9vbsUH4N04atr0q_Abp04pCUTBhNio,127
3
3
  SURE/assembly/__init__.py,sha256=jxZLURXKPzXe21LhrZ09LgZr33iqdjlQy4oSEj5gR2Q,172
4
4
  SURE/assembly/assembly.py,sha256=6IMdelPOiRO4mUb4dC7gVCoF1Uvfw86-Map8P_jnUag,21477
@@ -9,9 +9,9 @@ SURE/utils/__init__.py,sha256=Htqv4KqVKcRiaaTBsR-6yZ4LSlbhbzutjNKXGD9-uds,660
9
9
  SURE/utils/custom_mlp.py,sha256=07TYX1HgxfEjb_3i5MpiZfNhOhx3dKntuwGkrpteWiM,7036
10
10
  SURE/utils/queue.py,sha256=E_5PA5EWcBoGAZj8BkKQnkCK0p4C-4-xcTPqdIXaPXU,1892
11
11
  SURE/utils/utils.py,sha256=IUHjDDtYaAYllCWsZyIzqQwaLul6fJRvHRH4vIYcR-c,8462
12
- sure_tools-1.0.4.dist-info/licenses/LICENSE,sha256=TFHKwmrAViXQbSX5W-NDItkWFjm45HWOeUniDrqmnu0,1065
13
- sure_tools-1.0.4.dist-info/METADATA,sha256=2dPXR-pUr_8fNXewgDEo4oueSuRE0If05GQU94wypEo,2650
14
- sure_tools-1.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
- sure_tools-1.0.4.dist-info/entry_points.txt,sha256=u12payZYgCBy5FCwRHP6AlSQhKCiWSEDwj68r1DVdn8,40
16
- sure_tools-1.0.4.dist-info/top_level.txt,sha256=BtFTebdiJeqra4r6mm-uEtwVRFLZ_IjYsQ7OnalrOvY,5
17
- sure_tools-1.0.4.dist-info/RECORD,,
12
+ sure_tools-1.0.6.dist-info/licenses/LICENSE,sha256=TFHKwmrAViXQbSX5W-NDItkWFjm45HWOeUniDrqmnu0,1065
13
+ sure_tools-1.0.6.dist-info/METADATA,sha256=cKNMze-GwDXElf_fihOOaAYpT_gFdzCYw1t6GTFTDjg,2650
14
+ sure_tools-1.0.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
+ sure_tools-1.0.6.dist-info/entry_points.txt,sha256=u12payZYgCBy5FCwRHP6AlSQhKCiWSEDwj68r1DVdn8,40
16
+ sure_tools-1.0.6.dist-info/top_level.txt,sha256=BtFTebdiJeqra4r6mm-uEtwVRFLZ_IjYsQ7OnalrOvY,5
17
+ sure_tools-1.0.6.dist-info/RECORD,,