I want to develop a machine learning model that predicts the correct medicine dosage required to keep a specific lab value within the target range of 5 to 7. I also have several other predictor variables available. I am unsure which machine learning algorithm would be most suitable for deployment and use with future patients. Additionally, should I define the outcome as binary (1 if the value is between 5 and 7, and 0 otherwise), or is there a better approach?
1 Answer
There is no single best model for any given task. Just try several models starting with simple models first and use an appropriate metric to decide which model has the best generalisation performance.
The decide between a regression model or a classifier you must decide on the metric. Is a having the quantity set to 5.000001 equally as good as 6 ?
A success for the binary classifier only takes into account if you are in the range [5,7] and not how close you are to the middle of that range.
You should probably be using a regression model if you think some subsets of the range are more valuable than others.
Even if you are using a regression model you can still turn it into a binary classifier simply by adding a decision rule on top of it (A Logistic Regression classifier is an example of this.) By doing this you will be able to also consider the precision and recall of your regression model as well as other traditional metrics like
- $\begingroup$ Since my target is to predict dosage so that lab value stays within range, I am not sure how can I develop a regression model. I was also thinking reinforcement learning. $\endgroup$user2704338– user27043382025-10-31 14:04:26 +00:00Commented Oct 31 at 14:04
- $\begingroup$ Reinforcement is very likely the wrong approach. Do you have a dataset ? What does a single data record look like. Is the data labelled ? $\endgroup$Digitallis– Digitallis2025-10-31 17:59:50 +00:00Commented Oct 31 at 17:59
- $\begingroup$ The data has a few other lab tests in past 30 days, age, gender etc. It has multiple records per person as atleast 3 rows per week. Before a person comes, we want to see what dose shall we give so a certain lab test value stays within range. $\endgroup$user2704338– user27043382025-10-31 21:04:25 +00:00Commented Oct 31 at 21:04
- $\begingroup$ So what is stopping you from doing a regression ? $\endgroup$Digitallis– Digitallis2025-11-05 11:09:14 +00:00Commented Nov 5 at 11:09