gemmr.sample_analysis.addon.test_scores_true_pearson
- gemmr.sample_analysis.addon.test_scores_true_pearson(estr, X, Y, Xorig, Yorig, x_align_ref, y_align_ref, results, **kwargs)
Calculates Pearson correlations between estimated and true test scores.
Requires that addon
test_scores()
is run before.Requires keyword arguments:
kwargs[‘test_statistics’][‘x_test_scores_true’]
kwargs[‘test_statistics’][‘x_test_scores_true’]
The latter two can be created by
mk_test_statistics_scores()
.Provides outcome metrics
x_test_scores_true_spearman
andy_test_scores_true_spearman
- Parameters:
estr (sklearn-style estimator) – fitted estimator
X (np.ndarray (n_samples, n_features)) – dataset X
Y (np.ndarray (n_samples, n_features)) – dataset Y
Xorig (
None
or np.ndarray (n_samples, n_orig_features)) – can beNone
. Allows to provide an alternative set of X features for calculating loadings. I.e. an implicit assumption is that the rows inX
andXorig
correspond to the same samples (subjects).Yorig (
None
or np.ndarray (n_samples, n_orig_features)) – can beNone
. Allows to provide an alternative set of Y features for calculating loadings. I.e. an implicit assumption is that the rows inY
andYorig
correspond to the same samples (subjects).x_align_ref ((n_features,)) – the sign of X weights is chosen such that the cosine-distance between fitted X weights and
x_align_ref
is positivey_align_ref ((n_features,)) – the sign of Y weights is chosen such that the cosine-distance between fitted Y weights and
y_align_ref
is positiveresults (xr.Dataset) – containing outcome features computed so far, and is modified with outcomes of this function
kwargs (dict) – keyword arguments