Download task_026/instruction.md from Lego-X/UXInteract: direct link, hf CLI and curl.
- Browser
- Download file 3.04 kB
-
https://huggingface.co/datasets/Lego-X/UXInteract/resolve/main/task_026/instruction.md
- Command line
-
hf download hf://datasets/Lego-X/UXInteract/task_026/instruction.md
-
curl -L -o instruction.md https://huggingface.co/datasets/Lego-X/UXInteract/resolve/main/task_026/instruction.md
Boston housing and Titanic analysis
Run the analysis as python3 solve.py from the project root using BostonHousing.txt (whitespace-delimited with a header) and titanic.csv. Work offline and do not change the inputs. Recompute boston_clean.csv, titanic_clean.csv, and report.html whenever inputs change. Print clear progress for the processing stages.
Boston housing
- Calculate Q1 and Q3 of
medvby linear interpolation at sorted positions(n-1) × q. Keep records within the inclusive fences Q1 − 1.5×IQR and Q3 + 1.5×IQR, preserving the original fields. Addrm_roundedby rounding positive room counts to the nearest integer, with half values rounded up. - On the raw data compute Pearson r between each other numeric feature and
medv; rank the top three by absolute correlation, using the feature name to break ties. On the cleaned data calculate meanmedvfor eachrm_roundedgroup. - Plot every cleaned observation with
rmon x,medvon y, and the fitted least-squares line. Use independent SVG marks or Canvas 2D circles, ellipses or rectangles at most 20 px across. Use a plot spanning at least 50 px in each direction, with no decorative marks in the data series. Both linear axes increase right/up and have at least two numeric ticks consistent with the plotted coordinates (x below, y to the left).
Titanic
Resolve missing age and deck by imputation or dropping only affected rows. Keep all complete rows, preserve other fields and observed values, and use finite imputed ages within the observed range. Treat embarked and class as categorical; pandas is optional and CSV need not encode dtypes. Add is_alone, true exactly when sibsp + parch == 0.
Use the cleaned rows to compute survival rates for each sex-by-class combination. Draw one bar for each combination, labeled below with both sex and class, including groups with zero rate. Heights share a zero baseline and a linear scale; show 0 and 1 (or 0% and 100%) on the left axis.
Report and acceptance
Use visible, legible HTML tables with a single header row and no merged data cells. Labels may be equivalent English or Chinese; table IDs, row order and styling are unrestricted. Show measurements to at least two decimal places (counts exact); percentages are acceptable for survival rates. Keep tables and graphics fully visible.
Acceptance Checklist
- Boston CSV contains all and only in-fence records with unchanged data and correct half-up room groups. The report shows the five
Metric / Valueentries Q1, Q3, lower, upper and outliers, the top threeFeature / Pearson r, andrm_rounded / Mean medvfor all groups. - Titanic CSV retains complete records, handles missing values and computes
is_alone. The visibleSex / Class / Survival ratetable follows the cleaned data. - The Boston scatter and trend line and the Titanic bars, ticks and group labels represent the computed results. Processing progress is printed, and regenerating results from changed data does not modify the inputs.