Back
ExamFull examExam paper only

18 01 2022 E T

Full exam for Numerical Analysis for Machine Learning in the Mathematical Engineering degree programme at Politecnico di Milano. The document covers: Course: Numerical Analysis for Machine Learning Prof. E. Miglio - January 18th 2022 Duration of the exam: 2.5 hours. Exercise 1 Cardiovascular diseases (CVDs) are the number 1 cause of death globally, taking an estimated 17.9 million lives each year, which accounts for 31% of

Numerical Analysis for Machine LearningFull exam

Document information

What's included in this study material

Full exam for Numerical Analysis for Machine Learning in the Mathematical Engineering degree programme at Politecnico di Milano. The document covers: Course: Numerical Analysis for Machine Learning Prof. E. Miglio - January 18th 2022 Duration of the exam: 2.5 hours. Exercise 1 Cardiovascular diseases (CVDs) are the number 1 cause of death globally, taking an estimated 17.9 million lives each year, which accounts for 31% of

Import quality: text was extracted directly from the original document.

Extracted content from the document

Representative passages recognised in different parts of the material. The full extracted text remains available to search, while this compact preview makes the page easier to read.

Page 1

Course: Numerical Analysis for Machine Learning Prof. E. Miglio - January 18th 2022 Duration of the exam: 2.5 hours. Exercise 1 Cardiovascular diseases (CVDs) are the number 1 cause of death globally, taking an estimated 17.9 million lives each year, which accounts for 31% of all deaths worlwide. This dataset contains the medical records of 299 patients who had heart failure, collected during their follow-up period, where each patient profile has 12 clinical features. People with cardiovascular disease or who are at high cardiovascular risk (due to the presence of one or more risk factors such as hypertension, diabetes, hyperlipidaemia or already established disease) need early detection and management wherein a machine learning model can be of great help. import pandas as pd import numpy as np import matplotlib.pyplot as plt data = pd.read_csv(’https://archive.ics.uci.edu/ml/machine-learning-databases/00519/ heart_failure_clinical_records_dataset.csv’) data_np = np.array(data) A = data_np[:,:-1].astype(np.float64).T # matrix containing the data (num features x num patients) labels = data_np[:,-1].astype(np.int32) # outcomes (0 = alive; 1 = death) 1. How many patients are associated with good and with bad outcome, respectively? 2. Perform PCA on the dataset by means of the SVD decomposition. Then, plot the trend of the following quantities and comment the results: 2.1. the singular values σk; 2.2. the cumulate fraction of singular values ∑k i=1σi∑q i=1σi ; 2.3. the fraction of the “explained variance” ∑k i=1σ2 i∑q i=1σ2 i ; 3. Generate a scatterplot of the first two principal components of the dataset, grouped by label; in light of the scatterplot: 3.1. Which one of the first two principal components correlates most with the outcome? 3.2. Is a bad outcome associated with…

Preview

First page of the document.

First page: 18 01 2022 E T