-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft: Update pituitary gland ODE with better simulator, ODE class and dataframe #94
base: master
Are you sure you want to change the base?
Conversation
Data generator added
Codecov Report
@@ Coverage Diff @@
## master #94 +/- ##
==========================================
+ Coverage 76.28% 76.75% +0.46%
==========================================
Files 26 26
Lines 2703 2869 +166
==========================================
+ Hits 2062 2202 +140
- Misses 641 667 +26
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
||
@jit | ||
def s_inf(c, k_s): | ||
return c ** 2 / (c ** 2 + k_s ** 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please document method
|
||
@jit | ||
def x_inf(V, V_x, s_x): | ||
return 1 / (1 + exp((V_x - V) / s_x)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please document method
Hi Johan, the pytest fails on the windows due to the length of the function names, i assume. Months ago @JustinShenk requested me to reduce the function names corresponding to ODE problems/models assuming the problem arises due to pep function/attribute naming style. However, we do not know the exact reason for the failure. I also wish to have these ODE models as a general-purpose package at Traja. At the moment this PR seems to have examples of ODE models exclusively for forecasting the parameters of the pituitary gland. Is there any way we could extract these methods and develop them as a general-purpose package for ODE problems? Thanks in advance ;) |
@@ -3,7 +3,8 @@ | |||
import pytest | |||
|
|||
from traja.dataset import dataset | |||
from traja.dataset.pituitary_gland import create_latin_hypercube_sampled_pituitary_df | |||
from traja.dataset.pituitary_gland import create_latin_hypercube_sampled_pituitary_df, \ | |||
pituitary_ori_ode_parameters_Isk_Ibk_Ikir_Icat_Ia_Inav, generate_pituitary_dataset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @WolfByttner Please rename these methods pituitary_ori_ode_parameters_Isk_Ibk_Ikir_Icat_Ia_Inav
. For example something like get_params(*list(pnames),**kwargs)
would be ideal. More than that travis CI stuck at those methods for some weird reasons.
@@ -653,3 +654,8 @@ def test_pituitary_gland_latin_hypercube_generator_gives_correct_number_of_sampl | |||
_, num_samples_out = create_latin_hypercube_sampled_pituitary_df(samples=num_samples) | |||
|
|||
assert num_samples == num_samples_out, "Hypercube sampler returned the wrong number of samples!" | |||
|
|||
|
|||
def test_pituitary_gland_random_sampler_generates_valid_dataframes(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this methods could be simply df_random_sampler
df = compute_pituitary_gland_df_from_parameters(downsample_rate, | ||
gcal, gsk, gk, gbk, gl, kc, | ||
sample_id) | ||
df = compute_pituitary_gland_df_fletcher_from_parameters(downsample_rate, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this method can be compute_fletcher
@WolfByttner I suggest this PR for |
I agree, we don’t have plans at the moment to add this to the basic
functionality of the library so research makes more sense.
…On Thu 2. Dec 2021 at 10:14 Saranraj Nambusubramaniyan < ***@***.***> wrote:
@WolfByttner <https://github.com/WolfByttner> I suggest this PR for
traja-research since it is more or less application-specific at the
moment. @JustinShenk <https://github.com/justinshenk> what do you think?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#94 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACOLMZAEOECFBLQ3ISPKLBDUO42IRANCNFSM5BYXPFZA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
This is an update to get better ODE parameters, add an ODE class (based on its behaviour) and integrate it more closely with Traja. The new setup generates dataframes to integrate with other Traja functions and work with the resampler, analysis functions.