Optimisation Problem: Given some data calculate the correct value
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have a real world problem that I would like to solve. I think this problem is an optimisation one. But I am not sure, and I have never work with optimisation algorithms or formulas.
I have 8 records of data:
- Start Date
- End Date
- Monday, Tuesday ... Sunday Values in milligrams
- Y
So a single record is a range of dates that a patient took some medicine. The patient takes every day his medicine as indicated by the data above (3rd point).
For example,
- 01/08/2018
- 15/08/2018
- Monday: 4.5 milligram, Tuesday: 4.5 milligram, Wednesday: 5.0 milligram .... Sunday: 5.5 milligram.
- 2.46
Given the above data, start date, end date, milligram per day, this yields to the value of Y.
I would like to calculate the milligram per day given a start, end dates and desired Y value.
Although programmatically I was able to represent the problem and also to calculate the total medicine in milligram given the range of dates etc, I am struggling on how to form a formula to solve the problem.
So given the following data:
- 01/08/2018
- 15/08/2018
- 2.46
I should get:
- Monday: 4.5 milligram, Tuesday: 4.5 milligram, Wednesday: 5.0 milligram .... Sunday: 5.5 milligram.
Y is a value that is observed by doing blood test and observe a specific variable. Y can have a range of 1.1 to 4.0 I would say. The Y is affected based on the medicine taken by the patient in total (i.e total milligram within the date range, not really concerned about how much is taken each day).
Is this possible?
Thank you!
optimization algorithms programming
 |Â
show 1 more comment
up vote
0
down vote
favorite
I have a real world problem that I would like to solve. I think this problem is an optimisation one. But I am not sure, and I have never work with optimisation algorithms or formulas.
I have 8 records of data:
- Start Date
- End Date
- Monday, Tuesday ... Sunday Values in milligrams
- Y
So a single record is a range of dates that a patient took some medicine. The patient takes every day his medicine as indicated by the data above (3rd point).
For example,
- 01/08/2018
- 15/08/2018
- Monday: 4.5 milligram, Tuesday: 4.5 milligram, Wednesday: 5.0 milligram .... Sunday: 5.5 milligram.
- 2.46
Given the above data, start date, end date, milligram per day, this yields to the value of Y.
I would like to calculate the milligram per day given a start, end dates and desired Y value.
Although programmatically I was able to represent the problem and also to calculate the total medicine in milligram given the range of dates etc, I am struggling on how to form a formula to solve the problem.
So given the following data:
- 01/08/2018
- 15/08/2018
- 2.46
I should get:
- Monday: 4.5 milligram, Tuesday: 4.5 milligram, Wednesday: 5.0 milligram .... Sunday: 5.5 milligram.
Y is a value that is observed by doing blood test and observe a specific variable. Y can have a range of 1.1 to 4.0 I would say. The Y is affected based on the medicine taken by the patient in total (i.e total milligram within the date range, not really concerned about how much is taken each day).
Is this possible?
Thank you!
optimization algorithms programming
Do you have any requirements that would not be satisfied simply by looking up in the table you already have?
â Henning Makholm
Aug 15 at 12:52
I am not sure. Because this is really a real world problem and not an exercise, I have a friend who takes a medicine this way and he is trying to get a desired Y value. I trust that the table should give always similar or close to similar results. It is an organism after all. With all that said, mathematically I don't think I have any requirements that would not be satisfied simply by looking up the table.
â John
Aug 15 at 12:55
I'm not asking simply out of an abstract desire to make things mathematically neat. But you have not explained what $Y$ even means -- so for all we know the only way to distinguish a good answer from a bad one is to ask what your table states for your given input.
â Henning Makholm
Aug 15 at 13:02
1
What is the time stamp of the $Y$ value compare to the date range? Are you measuring $Y$ at the end? Also, is the desired $Y$ value inside the range of $Y$ values in your data, or is it outside? Offhand, I would say this looks like a standard interpolation problem. You don't have a lot of data, though, so your accuracy might be suspect.
â Adrian Keister
Aug 15 at 13:05
Sorry for not making this clear. Y is a value that is observed by doing blood test and observe a specific variable, I just use Y here. Y can have a range of 1.1 to 4.0 I would say
â John
Aug 15 at 13:06
 |Â
show 1 more comment
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a real world problem that I would like to solve. I think this problem is an optimisation one. But I am not sure, and I have never work with optimisation algorithms or formulas.
I have 8 records of data:
- Start Date
- End Date
- Monday, Tuesday ... Sunday Values in milligrams
- Y
So a single record is a range of dates that a patient took some medicine. The patient takes every day his medicine as indicated by the data above (3rd point).
For example,
- 01/08/2018
- 15/08/2018
- Monday: 4.5 milligram, Tuesday: 4.5 milligram, Wednesday: 5.0 milligram .... Sunday: 5.5 milligram.
- 2.46
Given the above data, start date, end date, milligram per day, this yields to the value of Y.
I would like to calculate the milligram per day given a start, end dates and desired Y value.
Although programmatically I was able to represent the problem and also to calculate the total medicine in milligram given the range of dates etc, I am struggling on how to form a formula to solve the problem.
So given the following data:
- 01/08/2018
- 15/08/2018
- 2.46
I should get:
- Monday: 4.5 milligram, Tuesday: 4.5 milligram, Wednesday: 5.0 milligram .... Sunday: 5.5 milligram.
Y is a value that is observed by doing blood test and observe a specific variable. Y can have a range of 1.1 to 4.0 I would say. The Y is affected based on the medicine taken by the patient in total (i.e total milligram within the date range, not really concerned about how much is taken each day).
Is this possible?
Thank you!
optimization algorithms programming
I have a real world problem that I would like to solve. I think this problem is an optimisation one. But I am not sure, and I have never work with optimisation algorithms or formulas.
I have 8 records of data:
- Start Date
- End Date
- Monday, Tuesday ... Sunday Values in milligrams
- Y
So a single record is a range of dates that a patient took some medicine. The patient takes every day his medicine as indicated by the data above (3rd point).
For example,
- 01/08/2018
- 15/08/2018
- Monday: 4.5 milligram, Tuesday: 4.5 milligram, Wednesday: 5.0 milligram .... Sunday: 5.5 milligram.
- 2.46
Given the above data, start date, end date, milligram per day, this yields to the value of Y.
I would like to calculate the milligram per day given a start, end dates and desired Y value.
Although programmatically I was able to represent the problem and also to calculate the total medicine in milligram given the range of dates etc, I am struggling on how to form a formula to solve the problem.
So given the following data:
- 01/08/2018
- 15/08/2018
- 2.46
I should get:
- Monday: 4.5 milligram, Tuesday: 4.5 milligram, Wednesday: 5.0 milligram .... Sunday: 5.5 milligram.
Y is a value that is observed by doing blood test and observe a specific variable. Y can have a range of 1.1 to 4.0 I would say. The Y is affected based on the medicine taken by the patient in total (i.e total milligram within the date range, not really concerned about how much is taken each day).
Is this possible?
Thank you!
optimization algorithms programming
edited Aug 15 at 13:13
asked Aug 15 at 12:46
John
1041
1041
Do you have any requirements that would not be satisfied simply by looking up in the table you already have?
â Henning Makholm
Aug 15 at 12:52
I am not sure. Because this is really a real world problem and not an exercise, I have a friend who takes a medicine this way and he is trying to get a desired Y value. I trust that the table should give always similar or close to similar results. It is an organism after all. With all that said, mathematically I don't think I have any requirements that would not be satisfied simply by looking up the table.
â John
Aug 15 at 12:55
I'm not asking simply out of an abstract desire to make things mathematically neat. But you have not explained what $Y$ even means -- so for all we know the only way to distinguish a good answer from a bad one is to ask what your table states for your given input.
â Henning Makholm
Aug 15 at 13:02
1
What is the time stamp of the $Y$ value compare to the date range? Are you measuring $Y$ at the end? Also, is the desired $Y$ value inside the range of $Y$ values in your data, or is it outside? Offhand, I would say this looks like a standard interpolation problem. You don't have a lot of data, though, so your accuracy might be suspect.
â Adrian Keister
Aug 15 at 13:05
Sorry for not making this clear. Y is a value that is observed by doing blood test and observe a specific variable, I just use Y here. Y can have a range of 1.1 to 4.0 I would say
â John
Aug 15 at 13:06
 |Â
show 1 more comment
Do you have any requirements that would not be satisfied simply by looking up in the table you already have?
â Henning Makholm
Aug 15 at 12:52
I am not sure. Because this is really a real world problem and not an exercise, I have a friend who takes a medicine this way and he is trying to get a desired Y value. I trust that the table should give always similar or close to similar results. It is an organism after all. With all that said, mathematically I don't think I have any requirements that would not be satisfied simply by looking up the table.
â John
Aug 15 at 12:55
I'm not asking simply out of an abstract desire to make things mathematically neat. But you have not explained what $Y$ even means -- so for all we know the only way to distinguish a good answer from a bad one is to ask what your table states for your given input.
â Henning Makholm
Aug 15 at 13:02
1
What is the time stamp of the $Y$ value compare to the date range? Are you measuring $Y$ at the end? Also, is the desired $Y$ value inside the range of $Y$ values in your data, or is it outside? Offhand, I would say this looks like a standard interpolation problem. You don't have a lot of data, though, so your accuracy might be suspect.
â Adrian Keister
Aug 15 at 13:05
Sorry for not making this clear. Y is a value that is observed by doing blood test and observe a specific variable, I just use Y here. Y can have a range of 1.1 to 4.0 I would say
â John
Aug 15 at 13:06
Do you have any requirements that would not be satisfied simply by looking up in the table you already have?
â Henning Makholm
Aug 15 at 12:52
Do you have any requirements that would not be satisfied simply by looking up in the table you already have?
â Henning Makholm
Aug 15 at 12:52
I am not sure. Because this is really a real world problem and not an exercise, I have a friend who takes a medicine this way and he is trying to get a desired Y value. I trust that the table should give always similar or close to similar results. It is an organism after all. With all that said, mathematically I don't think I have any requirements that would not be satisfied simply by looking up the table.
â John
Aug 15 at 12:55
I am not sure. Because this is really a real world problem and not an exercise, I have a friend who takes a medicine this way and he is trying to get a desired Y value. I trust that the table should give always similar or close to similar results. It is an organism after all. With all that said, mathematically I don't think I have any requirements that would not be satisfied simply by looking up the table.
â John
Aug 15 at 12:55
I'm not asking simply out of an abstract desire to make things mathematically neat. But you have not explained what $Y$ even means -- so for all we know the only way to distinguish a good answer from a bad one is to ask what your table states for your given input.
â Henning Makholm
Aug 15 at 13:02
I'm not asking simply out of an abstract desire to make things mathematically neat. But you have not explained what $Y$ even means -- so for all we know the only way to distinguish a good answer from a bad one is to ask what your table states for your given input.
â Henning Makholm
Aug 15 at 13:02
1
1
What is the time stamp of the $Y$ value compare to the date range? Are you measuring $Y$ at the end? Also, is the desired $Y$ value inside the range of $Y$ values in your data, or is it outside? Offhand, I would say this looks like a standard interpolation problem. You don't have a lot of data, though, so your accuracy might be suspect.
â Adrian Keister
Aug 15 at 13:05
What is the time stamp of the $Y$ value compare to the date range? Are you measuring $Y$ at the end? Also, is the desired $Y$ value inside the range of $Y$ values in your data, or is it outside? Offhand, I would say this looks like a standard interpolation problem. You don't have a lot of data, though, so your accuracy might be suspect.
â Adrian Keister
Aug 15 at 13:05
Sorry for not making this clear. Y is a value that is observed by doing blood test and observe a specific variable, I just use Y here. Y can have a range of 1.1 to 4.0 I would say
â John
Aug 15 at 13:06
Sorry for not making this clear. Y is a value that is observed by doing blood test and observe a specific variable, I just use Y here. Y can have a range of 1.1 to 4.0 I would say
â John
Aug 15 at 13:06
 |Â
show 1 more comment
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2883557%2foptimisation-problem-given-some-data-calculate-the-correct-value%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Do you have any requirements that would not be satisfied simply by looking up in the table you already have?
â Henning Makholm
Aug 15 at 12:52
I am not sure. Because this is really a real world problem and not an exercise, I have a friend who takes a medicine this way and he is trying to get a desired Y value. I trust that the table should give always similar or close to similar results. It is an organism after all. With all that said, mathematically I don't think I have any requirements that would not be satisfied simply by looking up the table.
â John
Aug 15 at 12:55
I'm not asking simply out of an abstract desire to make things mathematically neat. But you have not explained what $Y$ even means -- so for all we know the only way to distinguish a good answer from a bad one is to ask what your table states for your given input.
â Henning Makholm
Aug 15 at 13:02
1
What is the time stamp of the $Y$ value compare to the date range? Are you measuring $Y$ at the end? Also, is the desired $Y$ value inside the range of $Y$ values in your data, or is it outside? Offhand, I would say this looks like a standard interpolation problem. You don't have a lot of data, though, so your accuracy might be suspect.
â Adrian Keister
Aug 15 at 13:05
Sorry for not making this clear. Y is a value that is observed by doing blood test and observe a specific variable, I just use Y here. Y can have a range of 1.1 to 4.0 I would say
â John
Aug 15 at 13:06