Referenced from lesson Grouped Samples
Use method chaining to define the grouped samples below, using the helper functions that you’ve already defined: is-old
, is-young
, is-cat
, is-dog
, is-female
, lookup-fixed
, and has-s-name
. We’ve given you the solution for the first sample, to get you started.
Subset | The code to define that subset |
---|---|
Kittens |
|
Puppies |
|
Fixed Cats |
|
Cats with “s” in their name |
|
Old Dogs |
|
Fixed Animals |
|
Old Female Cats |
|
Fixed Kittens |
|
Fixed Female Dogs |
|
Old Fixed Female Cats |
|
These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, and 1738598). Bootstrap:Data Science by Emmanuel Schanzer, Nancy Pfenning, Emma Youndtsmith, Jennifer Poole, Shriram Krishnamurthi, Joe Politz, Ben Lerner, Flannery Denny, and Dorai Sitaram with help from Eric Allatta and Joy Straub is licensed under a Creative Commons 4.0 Unported License. Based on a work at www.BootstrapWorld.org. Permissions beyond the scope of this license may be available by contacting schanzer@BootstrapWorld.org.