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.
- {pcntoolkit-0.30/pcntoolkit.egg-info → pcntoolkit-0.30.post1}/PKG-INFO +1 -1
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/normative.py +12 -11
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1/pcntoolkit.egg-info}/PKG-INFO +1 -1
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/setup.py +1 -1
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/LICENSE +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/MANIFEST.in +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/README.md +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/__init__.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/configs.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/dataio/__init__.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/dataio/fileio.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/model/NP.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/model/NPR.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/model/SHASH.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/model/__init__.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/model/architecture.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/model/bayesreg.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/model/gp.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/model/hbr.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/model/rfa.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/normative_NP.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/normative_model/__init__.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/normative_model/norm_base.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/normative_model/norm_blr.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/normative_model/norm_gpr.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/normative_model/norm_hbr.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/normative_model/norm_np.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/normative_model/norm_rfa.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/normative_model/norm_utils.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/normative_parallel.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/trendsurf.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/util/__init__.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/util/hbr_utils.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit/util/utils.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit.egg-info/SOURCES.txt +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit.egg-info/dependency_links.txt +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit.egg-info/not-zip-safe +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit.egg-info/requires.txt +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/pcntoolkit.egg-info/top_level.txt +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/requirements.txt +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/setup.cfg +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/tests/testHBR.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/tests/testHBR_transfer.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/tests/test_NP.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/tests/test_ST_NP.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/tests/test_blr.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/tests/test_gpr.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/tests/test_hbr_pymc.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/tests/test_normative.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/tests/test_normative_parallel.py +0 -0
- {pcntoolkit-0.30 → pcntoolkit-0.30.post1}/tests/test_rand_feat.py +0 -0
|
@@ -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
|
-
|
|
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)
|
|
@@ -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
|
|
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
|
|
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
|