← Indietro
EsameEsame completoTesto d’esame

18 01 2022 E T

Esame completo di Numerical Analysis for Machine Learning per il corso di Mathematical Engineering presso Politecnico di Milano. Materiale proveniente dall’archivio storico Studwiz e classificato per la consultazione online.

Numerical Analysis for Machine LearningEsame completo

Informazioni sul documento

Cosa trovi in questo materiale

Esame completo di Numerical Analysis for Machine Learning per il corso di Mathematical Engineering presso Politecnico di Milano. Materiale proveniente dall’archivio storico Studwiz e classificato per la consultazione online.

Qualità dell’importazione: il testo è stato estratto direttamente dal documento originale.

Contenuti estratti dal documento

Passaggi rappresentativi riconosciuti nelle diverse parti del materiale. Il testo completo resta presente nella pagina per la ricerca, mentre l’anteprima compatta rende più semplice la lettura.

Pagina 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…

Anteprima

Prima pagina del documento.

Prima pagina: 18 01 2022 E T