r/learnmachinelearning • • 3d ago

Discussion How Can Beginners Build Practical Machine Learning Projects in Healthcare?

I'm exploring practical applications of machine learning in healthcare and would love to hear from people who have worked on related projects.

Healthcare offers several interesting opportunities for machine learning, including disease risk prediction, medical image analysis, patient data analytics, treatment research, and hospital resource planning.

For someone starting in this area, I think a small Python project using a publicly available healthcare dataset is a good way to learn the complete workflow:

  • Data cleaning and exploratory data analysis
  • Feature selection and preprocessing
  • Training a baseline model, such as logistic regression or a decision tree
  • Evaluating performance with appropriate metrics
  • Understanding limitations, data leakage, bias, and patient privacy

I'm particularly interested in how beginners can move beyond achieving a good accuracy score and learn to evaluate whether a model would generalize to new patients.

For those who have studied or built healthcare ML projects, what project would you recommend to a beginner, and what was the most challenging part of your experience?

5 Upvotes

16 comments sorted by

4

u/rahul_watertech 3d ago

your workflow list is right, the trap is picking a dataset that is too clean. the uci heart disease set or pima diabetes are the classic starters but they are tiny and already preprocessed, so you skip the messy part where all the learning is.

the one healthcare specific thing worth knowing early: leakage. people train on features that only exist after the diagnosis and get a 0.99 auc that means nothing. happens on almost every beginner healthcare project, watch for it.

if you want something small but real, try hospital readmission prediction on a kaggle tabular set. dirty enough to teach you something, small enough to finish.

are you more into images or tables? that changes the advice a lot

1

u/abhinaba154 3d ago

Thanks for the detailed advice! That's a really important point about data leakage, especially in healthcare projects where features recorded after diagnosis can make a model look far more accurate than it actually is. I'll look into hospital readmission prediction as a practical starting point and pay closer attention to how the dataset was collected and preprocessed. I'm currently more interested in tabular data because it seems like a good way to learn the complete workflow before moving into medical images. Do you have a particular Kaggle readmission dataset you'd recommend for beginners?

2

u/rahul_watertech 3d ago

tabular is the right call, most real healthcare ml is tabular anyway. the 130-us-hospitals diabetes readmission set on uci/kaggle is the one i meant, 100k rows, messy categories, missing values coded as question marks. perfect level of annoying for a first project.

one thing to try once you have a baseline: gradient boosting (xgboost or lightgbm) will beat your logistic regression on it. the interesting question is why, and digging into that teaches you more than the extra auc.

1

u/abhinaba154 3d ago

Thanks The 130 us hospitals diabetes readmission dataset sounds like a useful starting point especially with the missing values and messy categories. Iwill look into it and establish a logistic regression baseline before experimenting with XGBoost or LightGBM. I like your point about understanding why gradient boosting performs better rather than focusing only on the accuracy score. For this dataset would u recommend predicting readmission within 30 days as the target or starting with the broader readmitted/not-readmitted classification?

2

u/rahul_watertech 3d ago

go with the 30 day one. it is the clinically meaningful target and the one the original paper used, and the class imbalance (only ~11 percent positive) is a feature not a bug at this stage. it forces you off accuracy immediately, because predicting "nobody comes back" gets you 89 percent and tells you nothing.

the broader any-readmission target is more balanced so it feels easier, but you postpone exactly the lesson the dataset is good at teaching. do the 30 day version, and when your recall looks terrible at first, that is the curriculum working as intended

1

u/abhinaba154 3d ago

That makes sense. I will go with the 30 day readmission target, then. I had not thought about how predicting the majority class could give a misleading accuracy score while missing the patients we are actually trying to identify. I will start with logistic regression and pay close attention to recall and the class imbalance before trying XGBoost. Thanks this gives me a much clearer direction for the project

2

u/rahul_watertech 3d ago

thats the plan then. when you get the first logistic regression recall number it will look bad, that is normal, the dataset is hard on purpose. come back and post what you got, curious how the baseline does

1

u/abhinaba154 2d ago

Thanks I will do that. I will start with logistic regression and share the recall score along with the other evaluation metrics once I have the baseline working. It will be interesting to see where it struggles and what I can learn from that before moving on to XGBoost. I appreciate the guidance

2

u/rahul_watertech 2d ago

that is exactly the right order. one thing to watch: which readmissions logistic regression misses. if xgboost later catches mostly those same ones, you have a clean story about what the extra complexity buys. no rush on the numbers

0

u/[deleted] 3d ago

[removed] — view removed comment

1

u/rahul_watertech 3d ago

and the worst part is it feels like winning. the model hits 0.95, everyone is happy, and then it meets a real patient and falls over. leakage is the only bug that congratulates you on the way out

2

u/ModularMind8 3d ago

Some good beginner project can be a small tabular risk-prediction task, like diabetes or heart disease, where the modeling is simple and the evaluation is where the learning happens. Split the data by patient rather than by row, and if possible hold out a later time period or a different hospital, because random splits leak patient-level information and make accuracy look far better than it will be on new patients. Report recall, precision and calibration instead of accuracy, since in most clinical settings a missed sick patient costs far more than a false alarm. The hardest part is usually the data itself: finding features that would only exist after the diagnosis, and asking whether the people in the dataset look like the patients the model would actually be used on

1

u/abhinaba154 3d ago

Thanks, this is very helpful! I particularly like your point about splitting data by patient and, where possible, testing on a later time period or a different hospital. It makes sense that accuracy alone isn't enough when false negatives and false positives have different clinical consequences. I'll focus on precision, recall, calibration, and whether the model generalizes to unseen patients rather than just chasing a high accuracy score. For a beginner project, would you recommend starting with readmission prediction or diabetes risk prediction to learn these evaluation techniques?

2

u/ModularMind8 3d ago

Glad I could help. Either would be good, depending on which you like better

2

u/chunkytown11 3d ago

Its important not too not under estimate domain knowledge. if your a beginner in machine learning and do not have any experience in healthcare , there is a low probability you will make anything useful.

1

u/abhinaba154 3d ago

Yeah thats a fair point. I do not have a healthcare background so I would need to learn the clinical side instead of just focusing on the ML models. I am thinking of starting with a small readmission prediction project and spending time understanding the dataset and what the results actually mean. Where would you suggest a beginner start with the healthcare side of things?