Instructions:
Step 0: Data Cleaning (10%)
The first step is to inspect the data for errors and outliers. To accomplish
this task, follow the model used in Day 1’s practical session, using
boxplots to visually inspect the data for outliers or nonsensical values.
Replace any outliers found the average value of the feature.
Step 1: Data Processing (20%)
The dataset comprises a time-series of patient measurements over 48
hours. Prior to implementing a supervised learning model, it is essential
to transform the data into an appropriate matrix that can be fed into a
supervised learning algorithm, which does not capture the temporal
nature of the data, such as XGBoost or SVM. For each patient, the preprocessing step consists of aggregating the 48 measurements for each
patient into one measurement. Therefore resulting in the
transformation of the original data from 128160 (2670×48) rows to 2670
rows. Each patient will then have one outcome point in the outcome
vector y.
For each measurement m (e.g. heart rate), you will extract Δm, which
measures the difference between the value of the measurement during
hour 1 and the value of the measurement during hour 48. Data
aggregation can be easily implemented in Pandas using the groupby
and aggregate functions described below:
• Groupby: function is used to split the data into groups based
on some criteria. Groupby’s full documentation can be found
here:
https://pandas.pydata.org/docs/reference/api/pandas.DataFra
me.groupby.html
• Aggregate: Used to create aggregates of features/groups of
interest. Numerous aggregate functions are available, including
first() and last(). Full documentation is found here:
https://pandas.pydata.org/docs/reference/api/pandas.DataFra
me.aggregate.html
The joint use of groupby and aggregate will enable you to extract Δm as
follows:
1. Use groupby to group samples by patients (using the PatientiD
columns). This way, the aggregates generated are guaranteed
to be per patient.
2. To generate Δm, you will require the first and last value for
the feature m for each patient. Use aggregate to the grouped
dataframe to generate two features from m, corresponding to
the feature’ first and last values.
3. Use the first and last value aggregates to generate Δm for
each feature. The result should be a 2670×25 matrix.
Step 2: Understanding your Data (20%)
Using a combination of summary statistics and plots, describe the
dataset you have generated. What is the distribution of the outcome?
How are the individual features (e.g. Mean BP) distributed across
mortality categories (i.e. mortality = 0 and mortality = 1)? The following
Python capabilities can help you:
• Dataframe subsetting: You can split a dataframe based on a given
condition. You can therefore generate two dataframe objects, one
containing aggregated measurements of patients with
Mortality30Days = 0 and another containing aggregated
measurements of patients with Mortality30Days = 1.
• As we did in our practicals, you can use the t-test to discover any
significant difference between the Mortality30Days=0 dataframe
and the Mortality30Days=1 dataframe with respect to each
feature.
• Use plots when necessary to visualise your findings.
Task 3: Classifier Implementation (30%)
You will implement your classification system using the XGBoost
algorithm.. XGBoost is not part of the standard sklearn package. You will
therefore have two routes into using the algorithm to implement your
pipeline:
1. Install the XGBoost library into your Anaconda python platform.
2. Use Google colab (https://colab.research.google.com/) to
implement your jupyter notebook pipeline.
Option 1 is the preferred route and will be allocated more points.
The following should be adhered to while building your model:
1. Use XGBoost’s documentation to identify the model’s
Why Work with Us
Top Quality and Well-Researched Papers
We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.
Professional and Experienced Academic Writers
We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.
Free Unlimited Revisions
If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.
Prompt Delivery and 100% Money-Back-Guarantee
All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.
Original & Confidential
We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.
24/7 Customer Support
Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.
Try it now!
How it works?
Follow these simple steps to get your paper done
Place your order
Fill in the order form and provide all details of your assignment.
Proceed with the payment
Choose the payment system that suits you most.
Receive the final file
Once your paper is ready, we will email it to you.
Our Services
No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.
Essays
No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.
Admissions
Admission Essays & Business Writing Help
An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.
Reviews
Editing Support
Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.
Reviews
Revision Support
If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.