Skip to content

Commit

Permalink
Fix documentation bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
mdenker committed Nov 19, 2023
1 parent dd22f6c commit 6997ddd
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 22 deletions.
6 changes: 0 additions & 6 deletions doc/tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ avg_std_correlation_test

.. autoclass:: networkunit.tests.avg_std_correlation_test

===================================
generalized_correlation_matrix_test
===================================

.. autoclass:: networkunit.tests.generalized_correlation_matrix_test

===============
eigenvalue_test
===============
Expand Down
3 changes: 3 additions & 0 deletions networkunit/scores/effect_size.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import matplotlib.pyplot as plt

class effect_size(sciunit.Score):
"""
Calculates the effect size between samples.
"""

score = np.nan

Expand Down
5 changes: 3 additions & 2 deletions networkunit/scores/students_t.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
class students_t(sciunit.Score):
"""
Student's T-test
NOTE: should be named ttest only because if equal_var=False -> Welch's t-test
The computation is performed by the scipy.stats.ttest_ind() function.
"""
score = np.nan

# TODO: should be named ttest only because if equal_var=False -> Welch's t-test
# The computation is performed by the scipy.stats.ttest_ind() function.

@classmethod
def compute(self, data_sample_1, data_sample_2, equal_var=True, **kwargs):
# Filter out nans and infs
Expand Down
28 changes: 14 additions & 14 deletions networkunit/scores/wasserstein_distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@


class wasserstein_distance(sciunit.Score):
"""
Calculates the Wasserstein distance (Earth mover's distance) between
two point clouds. Uses the opencv implementation in the backend and can
handle any dimensionality. The observation and prediction must have the
same dimensionality.
norm : string
Determines normalization of the input data.
* If 'obsv', then all data are normalized based on the observation
mean and standard deviation (default)
* If 'pred', then the prediction mean and std are used
* If 'both', then the observation and prediction are concatenated
and the mean and std of the full array are used for normalization.
"""
score = np.nan
_best = 0.
_worst = np.nan_to_num(np.inf)

@classmethod
def compute(self, observation, prediction, norm='both', **kwargs):
"""
Calculates the Wasserstein distance (Earth mover's distance) between
two point clouds. Uses the opencv implementation in the backend and can
handle any dimensionality. The observation and prediction must have the
same dimensionality.
norm : string
Determines normalization of the input data.
* If 'obsv', then all data are normalized based on the observation
mean and standard deviation (default)
* If 'pred', then the prediction mean and std are used
* If 'both', then the observation and prediction are concatenated
and the mean and std of the full array are used for normalization.
"""
if type(observation) == list:
observation = np.array(observation)
if type(prediction) == list:
Expand Down

0 comments on commit 6997ddd

Please sign in to comment.