The median is the middle value of an ordered set of values, or the average of the two middle values when the set has even size.
The median is a middle-value summary used to replace missing numbers. It offers an alternative to the average when filling gaps in a useful column. section 13.2
Filling missing ages
The Age column contains 177 missing values among 891 rows. Calculating its median gives 28, which can replace each missing age while preserving the column. section 13.2
How Grokking Machine Learning covers it
How deep it goes
Applies the median through a concrete missing-data workflow but does not develop its mathematical calculation.
Examples
Demonstrates replacing 177 missing Age values with the calculated median of 28 in an 891-row dataset.
What you can do after
Apply it via median and fillna functions to replace missing numeric entries.
How it connects
Connects the median to missing data, averages, data cleaning, and imputation.
D3.js in Action, Third EditionThe median is the middle value of an ordered dataset, or the midpoint between the two middle values when the dataset has an even size.
point forecastuses · A point forecast is a prediction that assigns a single value to each future observation without representing forecast uncertainty.
meancontrasts with · A mean is a measure of central tendency, calculated as the arithmetic average of values or, for a random variable, as the probability-weighted average of its possible values.
descriptive statisticskind of · Descriptive statistics are methods for summarizing and characterizing observed data without drawing conclusions beyond those data.
mean absolute errorused by · Mean absolute error is the arithmetic mean of the absolute differences between corresponding predicted and reference numerical values.
data aggregationkind of · Data aggregation is the combination of multiple values, records, observations, or results into a consolidated or summarized output.
quantilesequivalent to · A quantile is a value that divides an ordered dataset or probability distribution so that a specified proportion of observations lies at or below it.
This explainer was generated by Manning's knowledge graph from the text of Grokking Machine Learning. The section links point to the parts of the book it draws on.