Skip to content

Commit

Permalink
Try some more birth functions
Browse files Browse the repository at this point in the history
  • Loading branch information
kngwyu committed Aug 20, 2024
1 parent e5710be commit 507bd99
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
12 changes: 12 additions & 0 deletions config/bd/20240821-sel-const.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
birth_fn = "emevo.birth_and_death.SlopeELBirth"
hazard_fn = "emevo.birth_and_death.ConstantBirth"

[hazard_params]
scale = 0.01
alpha = 0.02
slope = 0.2
alpha_age = 2e-7
beta = 4e-6

[birth_params]
const = 0.0002
14 changes: 14 additions & 0 deletions config/bd/20240821-slope-04.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
birth_fn = "emevo.birth_and_death.SlopeELBirth"
hazard_fn = "emevo.birth_and_death.SlopeELGHazard"

[hazard_params]
scale = 0.01
alpha = 0.02
slope = 0.2
alpha_age = 2e-7
beta = 4e-6

[birth_params]
scale = 8e-4
slope = 0.1
const = -4e-4
2 changes: 1 addition & 1 deletion src/emevo/birth_and_death.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def cumulative(self, age: jax.Array, energy: jax.Array) -> jax.Array:
class SlopeELBirth(BirthFunction):
slope: float = 1.0
scale: float = 0.1
const: float = 1.0
const: float = 0.0

def __call__(self, age: jax.Array, energy: jax.Array) -> jax.Array:
del age
Expand Down

0 comments on commit 507bd99

Please sign in to comment.