@@ -692,13 +692,17 @@ def similarity(
692692 ignore_diagonal = False ,
693693 ** kwargs ,
694694 ):
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+
697699 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
699701 perm_type: (str) '1d','2d', or None
700702 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+
702706 """
703707 data1 = self .copy ()
704708 if not isinstance (data , Adjacency ):
@@ -1015,19 +1019,21 @@ def bootstrap(
10151019 ):
10161020 """Bootstrap an Adjacency method.
10171021
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-
10231022 Args:
10241023 function: (str) method to apply to data for each bootstrap
10251024 n_samples: (int) number of samples to bootstrap with replacement
10261025 save_weights: (bool) Save each bootstrap iteration
10271026 (useful for aggregating many bootstraps on a cluster)
10281027 n_jobs: (int) The number of CPUs to use to do the computation.
10291028 -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)
10311037
10321038 """
10331039
0 commit comments