Pandas

Predicting Life Expectancy

Intro

The focus here is on EDA (Exploratory Data Analysis) and investigating the best choice for the \(\lambda\) hyperparameter for LASSO and Ridge Regression.

We will be working on the Life Expectancy CSV data obtained from WHO.

This page is a worked notebook, not the theory: leave-one-out and \(m\)-fold cross-validation, the LOOCV shortcut for linear smoothers and their proofs are under cross-validation on the model selection page. The notebook also keeps some instructive faults, flagged where they occur:

Read more >

Machine Learning Example with Pandas

Source: https://www.w3resource.com/python-exercises/pandas/pandas-machine-learning-integration.php

Structure of data.csv:

ID	Name	  Age	Gender	Salary	 Target
1,Sara,25,Female,50000,0
2,Ophrah,30,Male,60000,1
3,Torben,22,Male,70000,0
4,Masaharu,35,Male,80000,1
5,Kaya,NaN,Female,55000,0
6,Abaddon,29,Male,NaN,1
Column Description:

ID: A unique identifier for each record (integer). Name: The name of the individual (string). Age: Age of the individual (numerical, may have missing values). Gender: Gender of the individual (categorical: Male/Female). Salary: The individual’s salary (numerical, may have missing values). Target: The target variable for binary classification (binary: 0 or 1).

Read more >