Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
lionelkusch committed Dec 19, 2024
1 parent a92d191 commit d19a514
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions hidimstat/scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,19 @@ def multivariate_1D_simulation(
"""

rng = np.random.default_rng(seed)

if n_groups < 0 or group_size < 0:
raise ValueError("The number of groups and their size must be positive.")

n_individual_samples = n_samples - n_groups * group_size
if n_individual_samples <= 0:
raise ValueError(
"The number of samples is too small compate to the number "
"of group and their size to gerate the data."
)

n_generate_samples = n_groups + n_individual_samples

# generate random data for each samples
X = np.zeros((n_generate_samples, n_features))
X[:, 0] = rng.standard_normal(n_generate_samples)
Expand All @@ -90,7 +90,7 @@ def multivariate_1D_simulation(
if shuffle:
rng.shuffle(X.T)

# generate data for the groups based on one sample
# generate data for the groups based on one sample
if n_groups > 0:
groups = np.repeat(X[:n_groups], group_size, axis=0)
X = np.vstack((groups, X[n_groups:]))
Expand Down
6 changes: 3 additions & 3 deletions hidimstat/test/test_clustered_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def test_clustered_inference_no_temporal_groups():

n_samples, n_features = 100, 2000
support_size = 10
n_groupss = 9
n_groups = 9
size = 10
sigma = 5.0
rho = 0.95
Expand All @@ -148,10 +148,10 @@ def test_clustered_inference_no_temporal_groups():
rho=rho,
shuffle=False,
seed=2,
n_groups=n_groupss,
n_groups=n_groups,
group_size=size,
)
groups = np.concatenate([[i] * size for i in range(n_groupss + 1)])
groups = np.concatenate([[i] * size for i in range(n_groups + 1)])

y = y - np.mean(y)
X_init = X_init - np.mean(X_init, axis=0)
Expand Down

0 comments on commit d19a514

Please sign in to comment.