Skip to learning content

DATA SCIENCE PYTHON PLAYGROUND

Machine Learning · Learn / Refresh

← Choose and Explain Models lessons
Communicate evidence · ML-M03 · 12–18 MIN

Explain a result responsibly

Connect claims with evidence and limitations.

  1. FollowRead and run the PythonCurrent exercise
  2. ChangeCompute and inspect the evidence
  3. TransferCompute and inspect the evidence

Understand the idea

Reports should name the task, population, evaluation design, reference, selected approach and limitations. Discovery reports describe profiles and assumptions; PCA reports retention and representation rather than prediction accuracy.

Connect claims with evidence and limitations.Candidate recipes: same question and available inputsCompare on the same training folds and metricJudge validation quality, cost and interpretation
Connect claims with evidence and limitations.Scroll the diagram horizontally if needed.

What the syntax does

pd.DataFrame
  • Organises the supplied comparison evidence into a report table.
'cv_rmse'
  • Names the training-validation error summary; the supplied values are illustrative, not newly fitted results.
'fold_sd'
  • Names variation across folds, not an uncertainty guarantee or an independent final-test result.

Outputs you create

answer
  1. The requested result, with the values, labels and row order described by this task.

Evidence to use

  1. Illustrative reporting evidence, not scores fitted here or results from the supplied teaching dataframe: predict completion time in hours for repair jobs at one workshop, using measurements available at intake.
  2. Of 100 historical jobs, 80 are development rows and 20 are reserved for a later final test; no final-test result is available.
  3. All three workflows use the same five shuffled development folds, seed 42, with preparation fitted within each training fold.
  4. The dummy predicts that training fold's mean completion time.
  5. Mean validation RMSE / fold standard deviation, both in hours: dummy 4.4 / 0.7; linear 4.2 / 0.6; tree 4.3 / 0.8.
  6. Fold standard deviations describe variation, not confidence intervals; paired fold scores are not supplied.
Your task
  1. Build answer from the supplied illustrative reporting evidence, with columns model, cv_rmse and fold_sd, in dummy, linear, tree row order.
  2. Include the training-mean reference as well as both candidates.
  3. All errors and fold standard deviations are in hours
  4. Do not fit models or claim a final-test result.
answer
Hints

Think: A comparison table should keep the dummy reference beside both candidates and their fold variation.

Tools: pd.DataFrame with model, cv_rmse and fold_sd columns; all values are in hours.

Approach: Enter dummy, linear and tree as three aligned rows using the supplied illustrative results.

Explained solution
answer=pd.DataFrame({'model':['dummy','linear','tree'],'cv_rmse':[4.4,4.2,4.3],'fold_sd':[.7,.6,.8]})

The table keeps the dummy reference and both candidates on the same five development folds. Fold standard deviations describe variation rather than confidence intervals; the small mean differences alone do not establish reliable improvement.

Ctrl/⌘+Enter: Run · Tab: indent · Esc then Tab: leave editor

Python loads when you run. Code and results stay in this activity only.

Run your code to inspect its output. Check uses that same run.