Giter VIP home page Giter VIP logo

blood-demand-forecasting's Introduction

Problem Statement

Given the data for a hospital which contains information about the age, gender, blood group, the blood component requested, date and time when the component was requested, Quantity of blood requested. We have to predict total demand for a particular blood group x component, say the demand for B+ve Plasma, in the next 3 weeks. The time 3 weeks is important as the blood older than 3 weeks was less likely to deliver oxygen.

EDA

We did EDA to find out the relation of the blood quantity requested with the age, gender, week of the day. Some of the insights we found out were:-

Males require more blood than females
Children and teenagers require significantly higher levels of blood than adults
There are variations in average quantity of blood demanded with the day of the week, like on Sundays the average quantity of blood required is about half the blood quantity required on mondays.

Feature Engineering:-

We introduced some new features to the data, which include,

Average QTY for the last 7 days
Average QTY for the last 30 days
Ratio of above two (7d/30d)
P_qty_fem_l1d Number of female patients on the last day.
Number of patients of age >= 50
Number of patients of age <= 10
Label = Quantity of blood required in the next 1 day, a week and a month.

Approaches:-

Prediction for each blood component scaled by the % prevalence of corresponding blood group
Prediction for each unique blood component & blood group combination

Model

We used Xgboost Regressor for making predictions because there may be gaps in the time series while making predictions for some combinations.

Results

R-squared comes close to about 0.66 for one of the most common blood (group x component) combination ๐Ÿคฉ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.