pcntoolkit 0.30__tar.gz → 0.30.post1__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.
Files changed (51) hide show
  1. {pcntoolkit-0.30/pcntoolkit.egg-info → pcntoolkit-0.30.post1}/PKG-INFO +1 -1
  2. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/normative.py +12 -11
  3. {pcntoolkit-0.30 → pcntoolkit-0.30.post1/pcntoolkit.egg-info}/PKG-INFO +1 -1
  4. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/setup.py +1 -1
  5. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/LICENSE +0 -0
  6. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/MANIFEST.in +0 -0
  7. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/README.md +0 -0
  8. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/__init__.py +0 -0
  9. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/configs.py +0 -0
  10. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/dataio/__init__.py +0 -0
  11. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/dataio/fileio.py +0 -0
  12. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/model/NP.py +0 -0
  13. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/model/NPR.py +0 -0
  14. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/model/SHASH.py +0 -0
  15. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/model/__init__.py +0 -0
  16. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/model/architecture.py +0 -0
  17. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/model/bayesreg.py +0 -0
  18. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/model/gp.py +0 -0
  19. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/model/hbr.py +0 -0
  20. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/model/rfa.py +0 -0
  21. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/normative_NP.py +0 -0
  22. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/normative_model/__init__.py +0 -0
  23. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/normative_model/norm_base.py +0 -0
  24. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/normative_model/norm_blr.py +0 -0
  25. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/normative_model/norm_gpr.py +0 -0
  26. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/normative_model/norm_hbr.py +0 -0
  27. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/normative_model/norm_np.py +0 -0
  28. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/normative_model/norm_rfa.py +0 -0
  29. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/normative_model/norm_utils.py +0 -0
  30. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/normative_parallel.py +0 -0
  31. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/trendsurf.py +0 -0
  32. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/util/__init__.py +0 -0
  33. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/util/hbr_utils.py +0 -0
  34. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/util/utils.py +0 -0
  35. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit.egg-info/SOURCES.txt +0 -0
  36. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit.egg-info/dependency_links.txt +0 -0
  37. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit.egg-info/not-zip-safe +0 -0
  38. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit.egg-info/requires.txt +0 -0
  39. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit.egg-info/top_level.txt +0 -0
  40. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/requirements.txt +0 -0
  41. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/setup.cfg +0 -0
  42. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/tests/testHBR.py +0 -0
  43. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/tests/testHBR_transfer.py +0 -0
  44. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/tests/test_NP.py +0 -0
  45. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/tests/test_ST_NP.py +0 -0
  46. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/tests/test_blr.py +0 -0
  47. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/tests/test_gpr.py +0 -0
  48. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/tests/test_hbr_pymc.py +0 -0
  49. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/tests/test_normative.py +0 -0
  50. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/tests/test_normative_parallel.py +0 -0
  51. {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/tests/test_rand_feat.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pcntoolkit
3
- Version: 0.30
3
+ Version: 0.30.post1
4
4
  Summary: Predictive Clinical Neuroscience toolkit
5
5
  Home-page: http://github.com/amarquand/PCNtoolkit
6
6
  Author: Andre Marquand
@@ -800,7 +800,11 @@ def predict(covfile, respfile, maskfile=None, **kwargs):
800
800
  X = fileio.load(covfile)
801
801
  if len(X.shape) == 1:
802
802
  X = X[:, np.newaxis]
803
-
803
+ if respfile is not None:
804
+ Y, maskvol = load_response_vars(respfile, maskfile)
805
+ if len(Y.shape) == 1:
806
+ Y = Y[:, np.newaxis]
807
+
804
808
  sample_num = X.shape[0]
805
809
  if models is not None:
806
810
  feature_num = len(models)
@@ -817,6 +821,11 @@ def predict(covfile, respfile, maskfile=None, **kwargs):
817
821
  Xz = scaler_cov[fold].transform(X)
818
822
  else:
819
823
  Xz = X
824
+ if respfile is not None:
825
+ if outscaler in ['standardize', 'minmax', 'robminmax']:
826
+ Yz = scaler_resp[fold].transform(Y)
827
+ else:
828
+ Yz = Y
820
829
 
821
830
  # estimate the models for all variabels
822
831
  for i, m in enumerate(models):
@@ -842,18 +851,10 @@ def predict(covfile, respfile, maskfile=None, **kwargs):
842
851
  Yhat[:, i] = yhat.squeeze()
843
852
  S2[:, i] = s2.squeeze()
844
853
  if respfile is not None:
845
- Y, maskvol = load_response_vars(respfile, maskfile)
846
- Y = Y[:, i:i+1]
847
854
  if alg == 'hbr':
848
- if outscaler in ['standardize', 'minmax', 'robminmax']:
849
- Yz = scaler_resp[fold].transform(Y)
850
- else:
851
- Yz = Y
852
- Z[:,i] = nm.get_mcmc_zscores(Xz, Yz, **kwargs)
855
+ Z[:,i] = nm.get_mcmc_zscores(Xz, Yz[:, i:i+1], **kwargs)
853
856
  else:
854
- Z[:,i] = (Y - Yhat[:, i]) / np.sqrt(S2[:, i])
855
-
856
-
857
+ Z[:,i] = (Y[:, i] - Yhat[:, i]) / np.sqrt(S2[:, i])
857
858
 
858
859
  if respfile is None:
859
860
  save_results(None, Yhat, S2, None, outputsuffix=outputsuffix)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pcntoolkit
3
- Version: 0.30
3
+ Version: 0.30.post1
4
4
  Summary: Predictive Clinical Neuroscience toolkit
5
5
  Home-page: http://github.com/amarquand/PCNtoolkit
6
6
  Author: Andre Marquand
@@ -14,7 +14,7 @@ requirements = parse_requirements('requirements.txt')
14
14
  # version = '0.29-1'
15
15
 
16
16
  setup(name='pcntoolkit',
17
- version='0.30',
17
+ version='0.30-1',
18
18
  description='Predictive Clinical Neuroscience toolkit',
19
19
  url='http://github.com/amarquand/PCNtoolkit',
20
20
  author='Andre Marquand',
File without changes
File without changes
File without changes
File without changes