@@ -692,13 +692,17 @@ def similarity(
692
692
ignore_diagonal = False ,
693
693
** kwargs ,
694
694
):
695
- """Calculate similarity between two Adjacency matrices.
696
- Default is to use spearman correlation and permutation test.
695
+ """
696
+ Calculate similarity between two Adjacency matrices. Default is to use spearman
697
+ correlation and permutation test.
698
+
697
699
Args:
698
- data: Adjacency data, or 1-d array same size as self.data
700
+ data (Adjacency or array) : Adjacency data, or 1-d array same size as self.data
699
701
perm_type: (str) '1d','2d', or None
700
702
metric: (str) 'spearman','pearson','kendall'
701
- ignore_diagonal: (bool) only applies to 'directed' Adjacency types using perm_type=None or perm_type='1d'
703
+ ignore_diagonal: (bool) only applies to 'directed' Adjacency types using
704
+ perm_type=None or perm_type='1d'
705
+
702
706
"""
703
707
data1 = self .copy ()
704
708
if not isinstance (data , Adjacency ):
@@ -1015,19 +1019,21 @@ def bootstrap(
1015
1019
):
1016
1020
"""Bootstrap an Adjacency method.
1017
1021
1018
- Example Useage:
1019
- b = dat.bootstrap('mean', n_samples=5000)
1020
- b = dat.bootstrap('predict', n_samples=5000, algorithm='ridge')
1021
- b = dat.bootstrap('predict', n_samples=5000, save_weights=True)
1022
-
1023
1022
Args:
1024
1023
function: (str) method to apply to data for each bootstrap
1025
1024
n_samples: (int) number of samples to bootstrap with replacement
1026
1025
save_weights: (bool) Save each bootstrap iteration
1027
1026
(useful for aggregating many bootstraps on a cluster)
1028
1027
n_jobs: (int) The number of CPUs to use to do the computation.
1029
1028
-1 means all CPUs.Returns:
1030
- output: summarized studentized bootstrap output
1029
+
1030
+ Returns:
1031
+ summarized studentized bootstrap output
1032
+
1033
+ Examples:
1034
+ >>> b = dat.bootstrap('mean', n_samples=5000)
1035
+ >>> b = dat.bootstrap('predict', n_samples=5000, algorithm='ridge')
1036
+ >>> b = dat.bootstrap('predict', n_samples=5000, save_weights=True)
1031
1037
1032
1038
"""
1033
1039
0 commit comments