Skip to content

Commit

Permalink
fit model pages (see #2395)
Browse files Browse the repository at this point in the history
  • Loading branch information
flannery-denny committed Feb 15, 2025
1 parent 145236c commit 1583ef3
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[.landscape]
= Introducing fit-model

[.linkInstructions]
Expand All @@ -7,24 +6,39 @@ These data visualizations were generated using the @starter-file{fitting-animals
[cols="1a,1a", frame="none", options="header"]
|===
| `fun cy(x): (-3 * x) + 23 end` +
`fit-model(lizard-sample, "name", "pounds", "weeks", cy)`
`fit-model(` +
@hspace{1em} `lizard-sample, "name", "pounds", "weeks", cy)`
| `fun jo(x): (-0.8 * x) + 10.4 end` +
`fit-model(lizard-sample, "name", "pounds", "weeks", jo)`
`fit-model(` +
@hspace{1em} `lizard-sample, "name", "pounds", "weeks", jo)`

^| @image{../images/fit-cy-crop.png}
^| @image{../images/fit-jo-crop.png}
|===

@n What do you Notice? @fitb{}{}
[.FillVerticalSpace, cols="1a,1a", options="header"]
|===
| What do you Notice?
| What do you Wonder?

@fitb{}{}
|
|
|===

@n How is the `fit-model` plot for cy's model similar to the `fit-model` plot for jo's model? @fitb{}{}

@fitb{}{}

@fitb{}{}

@n What do you Wonder? @fitb{}{}
@n How is the `fit-model` plot for cy's model different from the `fit-model` plot for jo's model? @fitb{}{}

@fitb{}{}

@fitb{}{}

@n What do you think the three terms in the legend refer to?

- Model: @fitb{}{}
- Data: @fitb{}{}
- Residuals: @fitb{}{}
Original file line number Diff line number Diff line change
Expand Up @@ -11,62 +11,62 @@ For each model below, decide whether the fit is "poor", "ok", or "good". _Then_
* The range of days to adoption in this dataset are from 0 to 400.
* An @math{S} value of 300 means predicted adoption times could be off by 300 days.

This is a(n) @fitbruby{25em}{@ifsoln{good}}{poor, ok, good} model for the dataset.
| @ifsoln{7 or 8}
I @fitbruby{18em}{@ifsoln{strongly disagree}}{strongly agree, agree, disagree, strongly disagree} that this model is a good fit.
| @ifsoln{7}

| @n A student is exploring a dataset on climate change.

* The range of Arctic Sea Ice is from 3,920,000 to 7,670,000 square kilometers
* An @math{S} value of 300 means predicted Arctic Sea Ice coverage could be off by 300 square kilometers.

This is a(n) @fitbruby{25em}{@ifsoln{good}}{poor, ok, good} model for the dataset.
I @fitbruby{18em}{@ifsoln{strongly agree}}{strongly agree, agree, disagree, strongly disagree} that this model is a good fit.
| @ifsoln{1 or 2}

| @n A data scientist is working with data from US public schools.

* The range of graduates per school per year is 2 to 2003.
* An @math{S} value of 300 means predicted graduate values could be off by 300 students.

This is a(n) @fitbruby{25em}{@ifsoln{poor}}{poor, ok, good} model for the dataset.
| @ifsoln{6}
I @fitbruby{18em}{@ifsoln{disagree}}{strongly agree, agree, disagree, strongly disagree} that this model is a good fit.
| @ifsoln{5 or 6}

| @n A student is exploring a dataset on earthquakes.

* The range of earthquake depths in this dataset are from 4200m to 664000m.
* An @math{S} value of 300 means predicted earthquake depths could be off by 300 meters.

This is a(n) @fitbruby{25em}{@ifsoln{good}}{poor, ok, good} model for the dataset.
I @fitbruby{18em}{@ifsoln{strongly agree}}{strongly agree, agree, disagree, strongly disagree} that this model is a good fit.
| @ifsoln{3 or 4}

| @n A student is exploring a dataset on arrests in Los Angeles.

* The age range in this dataset is from 0 to 92.
* An @math{S} value of 1 means predicted ages could be off by 1 year.

This is a(n) @fitbruby{25em}{@ifsoln{good}}{poor, ok, good} model for the dataset.
I @fitbruby{18em}{@ifsoln{agree}}{strongly agree, agree, disagree, strongly disagree} that this model is a good fit.
| @ifsoln{3 or 4}

| @n A data scientist is working with data about snowflakes.

* The range of snowflake weights is from 0.001 grams to 0.02 grams.
* An @math{S} value of 1 means predicted values could be off by 1 gram.

This is a(n) @fitbruby{25em}{@ifsoln{poor}}{poor, ok, good} model for the dataset.
| @ifsoln{7 or 8}
I @fitbruby{18em}{@ifsoln{strongly disagree}}{strongly agree, agree, disagree, strongly disagree} that this model is a good fit.
| @ifsoln{8}

| @n A data scientist is working with data from animals at a shelter.

* The range of ages is from 0.5 years to 16 years.
* An @math{S} value of 1 means predicted ages could be off by 1 year.

This is a(n) @fitbruby{25em}{@ifsoln{ok}}{poor, ok, good} model for the dataset.
| @ifsoln{5}
I @fitbruby{18em}{@ifsoln{agree}}{strongly agree, agree, disagree, strongly disagree} that this model is a good fit.
| @ifsoln{5 or 6}

| @n A student is working with a dataset of adult blue whales.

* The range of weights is 200,000 to 330,000 pounds.
* An @math{S} value of 1 means predicted weights could be off by 1 pound.

This is a(n) @fitbruby{25em}{@ifsoln{good}}{poor, ok, good} model for the dataset.
I @fitbruby{18em}{@ifsoln{strongly agree}}{strongly agree, agree, disagree, strongly disagree} that this model is a good fit
| @ifsoln{1 or 2}
|===

0 comments on commit 1583ef3

Please sign in to comment.