Skip to content

Commit

Permalink
Switch to lognormal for defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
pchlenski committed Feb 17, 2022
1 parent 39e7710 commit dae28e9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/OmicsGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,8 @@ def generate_multiple(
# Initialize first sample distribution
if initial_distribution is None:
def initial_distribution(size):
return np.random.exponential(size=size) * np.random.binomial(1, 1-extinct_fraction, size=size)
# return np.random.exponential(size=size) * np.random.binomial(1, 1-extinct_fraction, size=size)
return np.random.lognormal(size=size) * np.random.binomial(1, 1-extinct_fraction, size=size)

# Generation loop
for i in range(n):
Expand Down Expand Up @@ -1115,7 +1116,8 @@ def _random(size) -> np.ndarray:

def _init_full(
self,
initial_distribution : callable = np.random.exponential,
# initial_distribution : callable = np.random.exponential,
initial_distribution : callable = np.random.lognormal,
growth_rate_distribution : callable = _random,
**kwargs) -> None:
"""
Expand Down

0 comments on commit dae28e9

Please sign in to comment.