• Save
  • Download
  • Clear Output
  • Runtime
  • Run All Cells

Loading Runtime

The penguins dataset is a 2D list. The inner lists at the following index positions contain:

  • 0 - Penguin Species
  • 1 - Island
  • 2 - Penguin Bill Length (in mm)
  • 3 - Penguin Bill Depth (in mm)
  • 4 - Penguin Flipper Length (in mm)
  • 5 - Penguin Body Mass (in grams)
  • 6 - Penguin Sex

We will fit a machine learning model to this dataset by:

  1. Removing observations with excessive missing data.
  2. Imputing missing data for observations with small amounts of missing data.
  3. Categorically encode any string data so that the entire dataset is made up of numeric values.
  4. Split the data into training and test datasets.
  5. Fit a Decision Tree model using the training data.
  6. Assess the model's accuracy using the "test" dataset.

Check the "shape" of the data

Let's check to make sure that all measured penguin attributes have the same number of values. Inner list at index position 0 has 344 values Inner list at index position 1 has 344 values Inner list at index position 2 has 344 values Inner list at index position 3 has 344 values Inner list at index position 4 has 344 values Inner list at index position 5 has 344 values Inner list at index position 6 has 344 values

Check for missing data: 'NA' values

We have good data for the species and island of each penguin.

We're missing values for two penguins for each of the body measurements.

We're missing sex data for 11 penguins.

Inner list at index position 0 has 0 "NA" values Inner list at index position 1 has 0 "NA" values Inner list at index position 2 has 2 "NA" values Inner list at index position 3 has 2 "NA" values Inner list at index position 4 has 2 "NA" values Inner list at index position 5 has 2 "NA" values Inner list at index position 6 has 11 "NA" values

Are the penguins that have 2 missing values the same two penguins or are these missing values spread throughout the penguins?

[['Adelie', 'Torgersen', 39.1, 18.7, 181.0, 3750.0, 'male'], ['Adelie', 'Torgersen', 39.5, 17.4, 186.0, 3800.0, 'female'], ['Adelie', 'Torgersen', 40.3, 18.0, 195.0, 3250.0, 'female'], ['Adelie', 'Torgersen', 'NA', 'NA', 'NA', 'NA', 'NA'], ['Adelie', 'Torgersen', 36.7, 19.3, 193.0, 3450.0, 'female']]
['Adelie', 'Torgersen', 'NA', 'NA', 'NA', 'NA', 'NA'] ['Adelie', 'Torgersen', 34.1, 18.1, 193.0, 3475.0, 'NA'] ['Adelie', 'Torgersen', 42.0, 20.2, 190.0, 4250.0, 'NA'] ['Adelie', 'Torgersen', 37.8, 17.1, 186.0, 3300.0, 'NA'] ['Adelie', 'Torgersen', 37.8, 17.3, 180.0, 3700.0, 'NA'] ['Adelie', 'Dream', 37.5, 18.9, 179.0, 2975.0, 'NA'] ['Gentoo', 'Biscoe', 44.5, 14.3, 216.0, 4100.0, 'NA'] ['Gentoo', 'Biscoe', 46.2, 14.4, 214.0, 4650.0, 'NA'] ['Gentoo', 'Biscoe', 47.3, 13.8, 216.0, 4725.0, 'NA'] ['Gentoo', 'Biscoe', 44.5, 15.7, 217.0, 4875.0, 'NA'] ['Gentoo', 'Biscoe', 'NA', 'NA', 'NA', 'NA', 'NA']

Remove the rows with 5 NaNs from the dataset

We now have 342 data points. [['Adelie', 'Torgersen', 39.1, 18.7, 181.0, 3750.0, 'male'], ['Adelie', 'Torgersen', 39.5, 17.4, 186.0, 3800.0, 'female'], ['Adelie', 'Torgersen', 40.3, 18.0, 195.0, 3250.0, 'female'], ['Adelie', 'Torgersen', 36.7, 19.3, 193.0, 3450.0, 'female'], ['Adelie', 'Torgersen', 39.3, 20.6, 190.0, 3650.0, 'male']]

Impute the remaining NaNs with the mode if a categorical variable, or the mean if a continuous variable.

['Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap'] ['Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream'] [39.1, 39.5, 40.3, 36.7, 39.3, 38.9, 39.2, 34.1, 42.0, 37.8, 37.8, 41.1, 38.6, 34.6, 36.6, 38.7, 42.5, 34.4, 46.0, 37.8, 37.7, 35.9, 38.2, 38.8, 35.3, 40.6, 40.5, 37.9, 40.5, 39.5, 37.2, 39.5, 40.9, 36.4, 39.2, 38.8, 42.2, 37.6, 39.8, 36.5, 40.8, 36.0, 44.1, 37.0, 39.6, 41.1, 37.5, 36.0, 42.3, 39.6, 40.1, 35.0, 42.0, 34.5, 41.4, 39.0, 40.6, 36.5, 37.6, 35.7, 41.3, 37.6, 41.1, 36.4, 41.6, 35.5, 41.1, 35.9, 41.8, 33.5, 39.7, 39.6, 45.8, 35.5, 42.8, 40.9, 37.2, 36.2, 42.1, 34.6, 42.9, 36.7, 35.1, 37.3, 41.3, 36.3, 36.9, 38.3, 38.9, 35.7, 41.1, 34.0, 39.6, 36.2, 40.8, 38.1, 40.3, 33.1, 43.2, 35.0, 41.0, 37.7, 37.8, 37.9, 39.7, 38.6, 38.2, 38.1, 43.2, 38.1, 45.6, 39.7, 42.2, 39.6, 42.7, 38.6, 37.3, 35.7, 41.1, 36.2, 37.7, 40.2, 41.4, 35.2, 40.6, 38.8, 41.5, 39.0, 44.1, 38.5, 43.1, 36.8, 37.5, 38.1, 41.1, 35.6, 40.2, 37.0, 39.7, 40.2, 40.6, 32.1, 40.7, 37.3, 39.0, 39.2, 36.6, 36.0, 37.8, 36.0, 41.5, 46.1, 50.0, 48.7, 50.0, 47.6, 46.5, 45.4, 46.7, 43.3, 46.8, 40.9, 49.0, 45.5, 48.4, 45.8, 49.3, 42.0, 49.2, 46.2, 48.7, 50.2, 45.1, 46.5, 46.3, 42.9, 46.1, 44.5, 47.8, 48.2, 50.0, 47.3, 42.8, 45.1, 59.6, 49.1, 48.4, 42.6, 44.4, 44.0, 48.7, 42.7, 49.6, 45.3, 49.6, 50.5, 43.6, 45.5, 50.5, 44.9, 45.2, 46.6, 48.5, 45.1, 50.1, 46.5, 45.0, 43.8, 45.5, 43.2, 50.4, 45.3, 46.2, 45.7, 54.3, 45.8, 49.8, 46.2, 49.5, 43.5, 50.7, 47.7, 46.4, 48.2, 46.5, 46.4, 48.6, 47.5, 51.1, 45.2, 45.2, 49.1, 52.5, 47.4, 50.0, 44.9, 50.8, 43.4, 51.3, 47.5, 52.1, 47.5, 52.2, 45.5, 49.5, 44.5, 50.8, 49.4, 46.9, 48.4, 51.1, 48.5, 55.9, 47.2, 49.1, 47.3, 46.8, 41.7, 53.4, 43.3, 48.1, 50.5, 49.8, 43.5, 51.5, 46.2, 55.1, 44.5, 48.8, 47.2, 46.8, 50.4, 45.2, 49.9, 46.5, 50.0, 51.3, 45.4, 52.7, 45.2, 46.1, 51.3, 46.0, 51.3, 46.6, 51.7, 47.0, 52.0, 45.9, 50.5, 50.3, 58.0, 46.4, 49.2, 42.4, 48.5, 43.2, 50.6, 46.7, 52.0, 50.5, 49.5, 46.4, 52.8, 40.9, 54.2, 42.5, 51.0, 49.7, 47.5, 47.6, 52.0, 46.9, 53.5, 49.0, 46.2, 50.9, 45.5, 50.9, 50.8, 50.1, 49.0, 51.5, 49.8, 48.1, 51.4, 45.7, 50.7, 42.5, 52.2, 45.2, 49.3, 50.2, 45.6, 51.9, 46.8, 45.7, 55.8, 43.5, 49.6, 50.8, 50.2] [18.7, 17.4, 18.0, 19.3, 20.6, 17.8, 19.6, 18.1, 20.2, 17.1, 17.3, 17.6, 21.2, 21.1, 17.8, 19.0, 20.7, 18.4, 21.5, 18.3, 18.7, 19.2, 18.1, 17.2, 18.9, 18.6, 17.9, 18.6, 18.9, 16.7, 18.1, 17.8, 18.9, 17.0, 21.1, 20.0, 18.5, 19.3, 19.1, 18.0, 18.4, 18.5, 19.7, 16.9, 18.8, 19.0, 18.9, 17.9, 21.2, 17.7, 18.9, 17.9, 19.5, 18.1, 18.6, 17.5, 18.8, 16.6, 19.1, 16.9, 21.1, 17.0, 18.2, 17.1, 18.0, 16.2, 19.1, 16.6, 19.4, 19.0, 18.4, 17.2, 18.9, 17.5, 18.5, 16.8, 19.4, 16.1, 19.1, 17.2, 17.6, 18.8, 19.4, 17.8, 20.3, 19.5, 18.6, 19.2, 18.8, 18.0, 18.1, 17.1, 18.1, 17.3, 18.9, 18.6, 18.5, 16.1, 18.5, 17.9, 20.0, 16.0, 20.0, 18.6, 18.9, 17.2, 20.0, 17.0, 19.0, 16.5, 20.3, 17.7, 19.5, 20.7, 18.3, 17.0, 20.5, 17.0, 18.6, 17.2, 19.8, 17.0, 18.5, 15.9, 19.0, 17.6, 18.3, 17.1, 18.0, 17.9, 19.2, 18.5, 18.5, 17.6, 17.5, 17.5, 20.1, 16.5, 17.9, 17.1, 17.2, 15.5, 17.0, 16.8, 18.7, 18.6, 18.4, 17.8, 18.1, 17.1, 18.5, 13.2, 16.3, 14.1, 15.2, 14.5, 13.5, 14.6, 15.3, 13.4, 15.4, 13.7, 16.1, 13.7, 14.6, 14.6, 15.7, 13.5, 15.2, 14.5, 15.1, 14.3, 14.5, 14.5, 15.8, 13.1, 15.1, 14.3, 15.0, 14.3, 15.3, 15.3, 14.2, 14.5, 17.0, 14.8, 16.3, 13.7, 17.3, 13.6, 15.7, 13.7, 16.0, 13.7, 15.0, 15.9, 13.9, 13.9, 15.9, 13.3, 15.8, 14.2, 14.1, 14.4, 15.0, 14.4, 15.4, 13.9, 15.0, 14.5, 15.3, 13.8, 14.9, 13.9, 15.7, 14.2, 16.8, 14.4, 16.2, 14.2, 15.0, 15.0, 15.6, 15.6, 14.8, 15.0, 16.0, 14.2, 16.3, 13.8, 16.4, 14.5, 15.6, 14.6, 15.9, 13.8, 17.3, 14.4, 14.2, 14.0, 17.0, 15.0, 17.1, 14.5, 16.1, 14.7, 15.7, 15.8, 14.6, 14.4, 16.5, 15.0, 17.0, 15.5, 15.0, 13.8, 16.1, 14.7, 15.8, 14.0, 15.1, 15.2, 15.9, 15.2, 16.3, 14.1, 16.0, 15.7, 16.2, 13.7, 14.3, 15.7, 14.8, 16.1, 17.9, 19.5, 19.2, 18.7, 19.8, 17.8, 18.2, 18.2, 18.9, 19.9, 17.8, 20.3, 17.3, 18.1, 17.1, 19.6, 20.0, 17.8, 18.6, 18.2, 17.3, 17.5, 16.6, 19.4, 17.9, 19.0, 18.4, 19.0, 17.8, 20.0, 16.6, 20.8, 16.7, 18.8, 18.6, 16.8, 18.3, 20.7, 16.6, 19.9, 19.5, 17.5, 19.1, 17.0, 17.9, 18.5, 17.9, 19.6, 18.7, 17.3, 16.4, 19.0, 17.3, 19.7, 17.3, 18.8, 16.6, 19.9, 18.8, 19.4, 19.5, 16.5, 17.0, 19.8, 18.1, 18.2, 19.0, 18.7] [181.0, 186.0, 195.0, 193.0, 190.0, 181.0, 195.0, 193.0, 190.0, 186.0, 180.0, 182.0, 191.0, 198.0, 185.0, 195.0, 197.0, 184.0, 194.0, 174.0, 180.0, 189.0, 185.0, 180.0, 187.0, 183.0, 187.0, 172.0, 180.0, 178.0, 178.0, 188.0, 184.0, 195.0, 196.0, 190.0, 180.0, 181.0, 184.0, 182.0, 195.0, 186.0, 196.0, 185.0, 190.0, 182.0, 179.0, 190.0, 191.0, 186.0, 188.0, 190.0, 200.0, 187.0, 191.0, 186.0, 193.0, 181.0, 194.0, 185.0, 195.0, 185.0, 192.0, 184.0, 192.0, 195.0, 188.0, 190.0, 198.0, 190.0, 190.0, 196.0, 197.0, 190.0, 195.0, 191.0, 184.0, 187.0, 195.0, 189.0, 196.0, 187.0, 193.0, 191.0, 194.0, 190.0, 189.0, 189.0, 190.0, 202.0, 205.0, 185.0, 186.0, 187.0, 208.0, 190.0, 196.0, 178.0, 192.0, 192.0, 203.0, 183.0, 190.0, 193.0, 184.0, 199.0, 190.0, 181.0, 197.0, 198.0, 191.0, 193.0, 197.0, 191.0, 196.0, 188.0, 199.0, 189.0, 189.0, 187.0, 198.0, 176.0, 202.0, 186.0, 199.0, 191.0, 195.0, 191.0, 210.0, 190.0, 197.0, 193.0, 199.0, 187.0, 190.0, 191.0, 200.0, 185.0, 193.0, 193.0, 187.0, 188.0, 190.0, 192.0, 185.0, 190.0, 184.0, 195.0, 193.0, 187.0, 201.0, 211.0, 230.0, 210.0, 218.0, 215.0, 210.0, 211.0, 219.0, 209.0, 215.0, 214.0, 216.0, 214.0, 213.0, 210.0, 217.0, 210.0, 221.0, 209.0, 222.0, 218.0, 215.0, 213.0, 215.0, 215.0, 215.0, 216.0, 215.0, 210.0, 220.0, 222.0, 209.0, 207.0, 230.0, 220.0, 220.0, 213.0, 219.0, 208.0, 208.0, 208.0, 225.0, 210.0, 216.0, 222.0, 217.0, 210.0, 225.0, 213.0, 215.0, 210.0, 220.0, 210.0, 225.0, 217.0, 220.0, 208.0, 220.0, 208.0, 224.0, 208.0, 221.0, 214.0, 231.0, 219.0, 230.0, 214.0, 229.0, 220.0, 223.0, 216.0, 221.0, 221.0, 217.0, 216.0, 230.0, 209.0, 220.0, 215.0, 223.0, 212.0, 221.0, 212.0, 224.0, 212.0, 228.0, 218.0, 218.0, 212.0, 230.0, 218.0, 228.0, 212.0, 224.0, 214.0, 226.0, 216.0, 222.0, 203.0, 225.0, 219.0, 228.0, 215.0, 228.0, 216.0, 215.0, 210.0, 219.0, 208.0, 209.0, 216.0, 229.0, 213.0, 230.0, 217.0, 230.0, 217.0, 222.0, 214.0, 215.0, 222.0, 212.0, 213.0, 192.0, 196.0, 193.0, 188.0, 197.0, 198.0, 178.0, 197.0, 195.0, 198.0, 193.0, 194.0, 185.0, 201.0, 190.0, 201.0, 197.0, 181.0, 190.0, 195.0, 181.0, 191.0, 187.0, 193.0, 195.0, 197.0, 200.0, 200.0, 191.0, 205.0, 187.0, 201.0, 187.0, 203.0, 195.0, 199.0, 195.0, 210.0, 192.0, 205.0, 210.0, 187.0, 196.0, 196.0, 196.0, 201.0, 190.0, 212.0, 187.0, 198.0, 199.0, 201.0, 193.0, 203.0, 187.0, 197.0, 191.0, 203.0, 202.0, 194.0, 206.0, 189.0, 195.0, 207.0, 202.0, 193.0, 210.0, 198.0] [3750.0, 3800.0, 3250.0, 3450.0, 3650.0, 3625.0, 4675.0, 3475.0, 4250.0, 3300.0, 3700.0, 3200.0, 3800.0, 4400.0, 3700.0, 3450.0, 4500.0, 3325.0, 4200.0, 3400.0, 3600.0, 3800.0, 3950.0, 3800.0, 3800.0, 3550.0, 3200.0, 3150.0, 3950.0, 3250.0, 3900.0, 3300.0, 3900.0, 3325.0, 4150.0, 3950.0, 3550.0, 3300.0, 4650.0, 3150.0, 3900.0, 3100.0, 4400.0, 3000.0, 4600.0, 3425.0, 2975.0, 3450.0, 4150.0, 3500.0, 4300.0, 3450.0, 4050.0, 2900.0, 3700.0, 3550.0, 3800.0, 2850.0, 3750.0, 3150.0, 4400.0, 3600.0, 4050.0, 2850.0, 3950.0, 3350.0, 4100.0, 3050.0, 4450.0, 3600.0, 3900.0, 3550.0, 4150.0, 3700.0, 4250.0, 3700.0, 3900.0, 3550.0, 4000.0, 3200.0, 4700.0, 3800.0, 4200.0, 3350.0, 3550.0, 3800.0, 3500.0, 3950.0, 3600.0, 3550.0, 4300.0, 3400.0, 4450.0, 3300.0, 4300.0, 3700.0, 4350.0, 2900.0, 4100.0, 3725.0, 4725.0, 3075.0, 4250.0, 2925.0, 3550.0, 3750.0, 3900.0, 3175.0, 4775.0, 3825.0, 4600.0, 3200.0, 4275.0, 3900.0, 4075.0, 2900.0, 3775.0, 3350.0, 3325.0, 3150.0, 3500.0, 3450.0, 3875.0, 3050.0, 4000.0, 3275.0, 4300.0, 3050.0, 4000.0, 3325.0, 3500.0, 3500.0, 4475.0, 3425.0, 3900.0, 3175.0, 3975.0, 3400.0, 4250.0, 3400.0, 3475.0, 3050.0, 3725.0, 3000.0, 3650.0, 4250.0, 3475.0, 3450.0, 3750.0, 3700.0, 4000.0, 4500.0, 5700.0, 4450.0, 5700.0, 5400.0, 4550.0, 4800.0, 5200.0, 4400.0, 5150.0, 4650.0, 5550.0, 4650.0, 5850.0, 4200.0, 5850.0, 4150.0, 6300.0, 4800.0, 5350.0, 5700.0, 5000.0, 4400.0, 5050.0, 5000.0, 5100.0, 4100.0, 5650.0, 4600.0, 5550.0, 5250.0, 4700.0, 5050.0, 6050.0, 5150.0, 5400.0, 4950.0, 5250.0, 4350.0, 5350.0, 3950.0, 5700.0, 4300.0, 4750.0, 5550.0, 4900.0, 4200.0, 5400.0, 5100.0, 5300.0, 4850.0, 5300.0, 4400.0, 5000.0, 4900.0, 5050.0, 4300.0, 5000.0, 4450.0, 5550.0, 4200.0, 5300.0, 4400.0, 5650.0, 4700.0, 5700.0, 4650.0, 5800.0, 4700.0, 5550.0, 4750.0, 5000.0, 5100.0, 5200.0, 4700.0, 5800.0, 4600.0, 6000.0, 4750.0, 5950.0, 4625.0, 5450.0, 4725.0, 5350.0, 4750.0, 5600.0, 4600.0, 5300.0, 4875.0, 5550.0, 4950.0, 5400.0, 4750.0, 5650.0, 4850.0, 5200.0, 4925.0, 4875.0, 4625.0, 5250.0, 4850.0, 5600.0, 4975.0, 5500.0, 4725.0, 5500.0, 4700.0, 5500.0, 4575.0, 5500.0, 5000.0, 5950.0, 4650.0, 5500.0, 4375.0, 5850.0, 4875.0, 6000.0, 4925.0, 4850.0, 5750.0, 5200.0, 5400.0, 3500.0, 3900.0, 3650.0, 3525.0, 3725.0, 3950.0, 3250.0, 3750.0, 4150.0, 3700.0, 3800.0, 3775.0, 3700.0, 4050.0, 3575.0, 4050.0, 3300.0, 3700.0, 3450.0, 4400.0, 3600.0, 3400.0, 2900.0, 3800.0, 3300.0, 4150.0, 3400.0, 3800.0, 3700.0, 4550.0, 3200.0, 4300.0, 3350.0, 4100.0, 3600.0, 3900.0, 3850.0, 4800.0, 2700.0, 4500.0, 3950.0, 3650.0, 3550.0, 3500.0, 3675.0, 4450.0, 3400.0, 4300.0, 3250.0, 3675.0, 3325.0, 3950.0, 3600.0, 4050.0, 3350.0, 3450.0, 3250.0, 4050.0, 3800.0, 3525.0, 3950.0, 3650.0, 3650.0, 4000.0, 3400.0, 3775.0, 4100.0, 3775.0] ['male', 'female', 'female', 'female', 'male', 'female', 'male', 'NA', 'NA', 'NA', 'NA', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'NA', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'NA', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'NA', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'NA', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'NA', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'male', 'female', 'male', 'female', 'female', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'male', 'female', 'female', 'male', 'female', 'male', 'male', 'female']
168 penguins are "male". 165 penguins are "female".

Replace "NA" values in 7th column with "male"

['Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Adelie', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Gentoo', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap', 'Chinstrap'] ['Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Torgersen', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Biscoe', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream', 'Dream'] [39.1, 39.5, 40.3, 36.7, 39.3, 38.9, 39.2, 34.1, 42.0, 37.8, 37.8, 41.1, 38.6, 34.6, 36.6, 38.7, 42.5, 34.4, 46.0, 37.8, 37.7, 35.9, 38.2, 38.8, 35.3, 40.6, 40.5, 37.9, 40.5, 39.5, 37.2, 39.5, 40.9, 36.4, 39.2, 38.8, 42.2, 37.6, 39.8, 36.5, 40.8, 36.0, 44.1, 37.0, 39.6, 41.1, 37.5, 36.0, 42.3, 39.6, 40.1, 35.0, 42.0, 34.5, 41.4, 39.0, 40.6, 36.5, 37.6, 35.7, 41.3, 37.6, 41.1, 36.4, 41.6, 35.5, 41.1, 35.9, 41.8, 33.5, 39.7, 39.6, 45.8, 35.5, 42.8, 40.9, 37.2, 36.2, 42.1, 34.6, 42.9, 36.7, 35.1, 37.3, 41.3, 36.3, 36.9, 38.3, 38.9, 35.7, 41.1, 34.0, 39.6, 36.2, 40.8, 38.1, 40.3, 33.1, 43.2, 35.0, 41.0, 37.7, 37.8, 37.9, 39.7, 38.6, 38.2, 38.1, 43.2, 38.1, 45.6, 39.7, 42.2, 39.6, 42.7, 38.6, 37.3, 35.7, 41.1, 36.2, 37.7, 40.2, 41.4, 35.2, 40.6, 38.8, 41.5, 39.0, 44.1, 38.5, 43.1, 36.8, 37.5, 38.1, 41.1, 35.6, 40.2, 37.0, 39.7, 40.2, 40.6, 32.1, 40.7, 37.3, 39.0, 39.2, 36.6, 36.0, 37.8, 36.0, 41.5, 46.1, 50.0, 48.7, 50.0, 47.6, 46.5, 45.4, 46.7, 43.3, 46.8, 40.9, 49.0, 45.5, 48.4, 45.8, 49.3, 42.0, 49.2, 46.2, 48.7, 50.2, 45.1, 46.5, 46.3, 42.9, 46.1, 44.5, 47.8, 48.2, 50.0, 47.3, 42.8, 45.1, 59.6, 49.1, 48.4, 42.6, 44.4, 44.0, 48.7, 42.7, 49.6, 45.3, 49.6, 50.5, 43.6, 45.5, 50.5, 44.9, 45.2, 46.6, 48.5, 45.1, 50.1, 46.5, 45.0, 43.8, 45.5, 43.2, 50.4, 45.3, 46.2, 45.7, 54.3, 45.8, 49.8, 46.2, 49.5, 43.5, 50.7, 47.7, 46.4, 48.2, 46.5, 46.4, 48.6, 47.5, 51.1, 45.2, 45.2, 49.1, 52.5, 47.4, 50.0, 44.9, 50.8, 43.4, 51.3, 47.5, 52.1, 47.5, 52.2, 45.5, 49.5, 44.5, 50.8, 49.4, 46.9, 48.4, 51.1, 48.5, 55.9, 47.2, 49.1, 47.3, 46.8, 41.7, 53.4, 43.3, 48.1, 50.5, 49.8, 43.5, 51.5, 46.2, 55.1, 44.5, 48.8, 47.2, 46.8, 50.4, 45.2, 49.9, 46.5, 50.0, 51.3, 45.4, 52.7, 45.2, 46.1, 51.3, 46.0, 51.3, 46.6, 51.7, 47.0, 52.0, 45.9, 50.5, 50.3, 58.0, 46.4, 49.2, 42.4, 48.5, 43.2, 50.6, 46.7, 52.0, 50.5, 49.5, 46.4, 52.8, 40.9, 54.2, 42.5, 51.0, 49.7, 47.5, 47.6, 52.0, 46.9, 53.5, 49.0, 46.2, 50.9, 45.5, 50.9, 50.8, 50.1, 49.0, 51.5, 49.8, 48.1, 51.4, 45.7, 50.7, 42.5, 52.2, 45.2, 49.3, 50.2, 45.6, 51.9, 46.8, 45.7, 55.8, 43.5, 49.6, 50.8, 50.2] [18.7, 17.4, 18.0, 19.3, 20.6, 17.8, 19.6, 18.1, 20.2, 17.1, 17.3, 17.6, 21.2, 21.1, 17.8, 19.0, 20.7, 18.4, 21.5, 18.3, 18.7, 19.2, 18.1, 17.2, 18.9, 18.6, 17.9, 18.6, 18.9, 16.7, 18.1, 17.8, 18.9, 17.0, 21.1, 20.0, 18.5, 19.3, 19.1, 18.0, 18.4, 18.5, 19.7, 16.9, 18.8, 19.0, 18.9, 17.9, 21.2, 17.7, 18.9, 17.9, 19.5, 18.1, 18.6, 17.5, 18.8, 16.6, 19.1, 16.9, 21.1, 17.0, 18.2, 17.1, 18.0, 16.2, 19.1, 16.6, 19.4, 19.0, 18.4, 17.2, 18.9, 17.5, 18.5, 16.8, 19.4, 16.1, 19.1, 17.2, 17.6, 18.8, 19.4, 17.8, 20.3, 19.5, 18.6, 19.2, 18.8, 18.0, 18.1, 17.1, 18.1, 17.3, 18.9, 18.6, 18.5, 16.1, 18.5, 17.9, 20.0, 16.0, 20.0, 18.6, 18.9, 17.2, 20.0, 17.0, 19.0, 16.5, 20.3, 17.7, 19.5, 20.7, 18.3, 17.0, 20.5, 17.0, 18.6, 17.2, 19.8, 17.0, 18.5, 15.9, 19.0, 17.6, 18.3, 17.1, 18.0, 17.9, 19.2, 18.5, 18.5, 17.6, 17.5, 17.5, 20.1, 16.5, 17.9, 17.1, 17.2, 15.5, 17.0, 16.8, 18.7, 18.6, 18.4, 17.8, 18.1, 17.1, 18.5, 13.2, 16.3, 14.1, 15.2, 14.5, 13.5, 14.6, 15.3, 13.4, 15.4, 13.7, 16.1, 13.7, 14.6, 14.6, 15.7, 13.5, 15.2, 14.5, 15.1, 14.3, 14.5, 14.5, 15.8, 13.1, 15.1, 14.3, 15.0, 14.3, 15.3, 15.3, 14.2, 14.5, 17.0, 14.8, 16.3, 13.7, 17.3, 13.6, 15.7, 13.7, 16.0, 13.7, 15.0, 15.9, 13.9, 13.9, 15.9, 13.3, 15.8, 14.2, 14.1, 14.4, 15.0, 14.4, 15.4, 13.9, 15.0, 14.5, 15.3, 13.8, 14.9, 13.9, 15.7, 14.2, 16.8, 14.4, 16.2, 14.2, 15.0, 15.0, 15.6, 15.6, 14.8, 15.0, 16.0, 14.2, 16.3, 13.8, 16.4, 14.5, 15.6, 14.6, 15.9, 13.8, 17.3, 14.4, 14.2, 14.0, 17.0, 15.0, 17.1, 14.5, 16.1, 14.7, 15.7, 15.8, 14.6, 14.4, 16.5, 15.0, 17.0, 15.5, 15.0, 13.8, 16.1, 14.7, 15.8, 14.0, 15.1, 15.2, 15.9, 15.2, 16.3, 14.1, 16.0, 15.7, 16.2, 13.7, 14.3, 15.7, 14.8, 16.1, 17.9, 19.5, 19.2, 18.7, 19.8, 17.8, 18.2, 18.2, 18.9, 19.9, 17.8, 20.3, 17.3, 18.1, 17.1, 19.6, 20.0, 17.8, 18.6, 18.2, 17.3, 17.5, 16.6, 19.4, 17.9, 19.0, 18.4, 19.0, 17.8, 20.0, 16.6, 20.8, 16.7, 18.8, 18.6, 16.8, 18.3, 20.7, 16.6, 19.9, 19.5, 17.5, 19.1, 17.0, 17.9, 18.5, 17.9, 19.6, 18.7, 17.3, 16.4, 19.0, 17.3, 19.7, 17.3, 18.8, 16.6, 19.9, 18.8, 19.4, 19.5, 16.5, 17.0, 19.8, 18.1, 18.2, 19.0, 18.7] [181.0, 186.0, 195.0, 193.0, 190.0, 181.0, 195.0, 193.0, 190.0, 186.0, 180.0, 182.0, 191.0, 198.0, 185.0, 195.0, 197.0, 184.0, 194.0, 174.0, 180.0, 189.0, 185.0, 180.0, 187.0, 183.0, 187.0, 172.0, 180.0, 178.0, 178.0, 188.0, 184.0, 195.0, 196.0, 190.0, 180.0, 181.0, 184.0, 182.0, 195.0, 186.0, 196.0, 185.0, 190.0, 182.0, 179.0, 190.0, 191.0, 186.0, 188.0, 190.0, 200.0, 187.0, 191.0, 186.0, 193.0, 181.0, 194.0, 185.0, 195.0, 185.0, 192.0, 184.0, 192.0, 195.0, 188.0, 190.0, 198.0, 190.0, 190.0, 196.0, 197.0, 190.0, 195.0, 191.0, 184.0, 187.0, 195.0, 189.0, 196.0, 187.0, 193.0, 191.0, 194.0, 190.0, 189.0, 189.0, 190.0, 202.0, 205.0, 185.0, 186.0, 187.0, 208.0, 190.0, 196.0, 178.0, 192.0, 192.0, 203.0, 183.0, 190.0, 193.0, 184.0, 199.0, 190.0, 181.0, 197.0, 198.0, 191.0, 193.0, 197.0, 191.0, 196.0, 188.0, 199.0, 189.0, 189.0, 187.0, 198.0, 176.0, 202.0, 186.0, 199.0, 191.0, 195.0, 191.0, 210.0, 190.0, 197.0, 193.0, 199.0, 187.0, 190.0, 191.0, 200.0, 185.0, 193.0, 193.0, 187.0, 188.0, 190.0, 192.0, 185.0, 190.0, 184.0, 195.0, 193.0, 187.0, 201.0, 211.0, 230.0, 210.0, 218.0, 215.0, 210.0, 211.0, 219.0, 209.0, 215.0, 214.0, 216.0, 214.0, 213.0, 210.0, 217.0, 210.0, 221.0, 209.0, 222.0, 218.0, 215.0, 213.0, 215.0, 215.0, 215.0, 216.0, 215.0, 210.0, 220.0, 222.0, 209.0, 207.0, 230.0, 220.0, 220.0, 213.0, 219.0, 208.0, 208.0, 208.0, 225.0, 210.0, 216.0, 222.0, 217.0, 210.0, 225.0, 213.0, 215.0, 210.0, 220.0, 210.0, 225.0, 217.0, 220.0, 208.0, 220.0, 208.0, 224.0, 208.0, 221.0, 214.0, 231.0, 219.0, 230.0, 214.0, 229.0, 220.0, 223.0, 216.0, 221.0, 221.0, 217.0, 216.0, 230.0, 209.0, 220.0, 215.0, 223.0, 212.0, 221.0, 212.0, 224.0, 212.0, 228.0, 218.0, 218.0, 212.0, 230.0, 218.0, 228.0, 212.0, 224.0, 214.0, 226.0, 216.0, 222.0, 203.0, 225.0, 219.0, 228.0, 215.0, 228.0, 216.0, 215.0, 210.0, 219.0, 208.0, 209.0, 216.0, 229.0, 213.0, 230.0, 217.0, 230.0, 217.0, 222.0, 214.0, 215.0, 222.0, 212.0, 213.0, 192.0, 196.0, 193.0, 188.0, 197.0, 198.0, 178.0, 197.0, 195.0, 198.0, 193.0, 194.0, 185.0, 201.0, 190.0, 201.0, 197.0, 181.0, 190.0, 195.0, 181.0, 191.0, 187.0, 193.0, 195.0, 197.0, 200.0, 200.0, 191.0, 205.0, 187.0, 201.0, 187.0, 203.0, 195.0, 199.0, 195.0, 210.0, 192.0, 205.0, 210.0, 187.0, 196.0, 196.0, 196.0, 201.0, 190.0, 212.0, 187.0, 198.0, 199.0, 201.0, 193.0, 203.0, 187.0, 197.0, 191.0, 203.0, 202.0, 194.0, 206.0, 189.0, 195.0, 207.0, 202.0, 193.0, 210.0, 198.0] [3750.0, 3800.0, 3250.0, 3450.0, 3650.0, 3625.0, 4675.0, 3475.0, 4250.0, 3300.0, 3700.0, 3200.0, 3800.0, 4400.0, 3700.0, 3450.0, 4500.0, 3325.0, 4200.0, 3400.0, 3600.0, 3800.0, 3950.0, 3800.0, 3800.0, 3550.0, 3200.0, 3150.0, 3950.0, 3250.0, 3900.0, 3300.0, 3900.0, 3325.0, 4150.0, 3950.0, 3550.0, 3300.0, 4650.0, 3150.0, 3900.0, 3100.0, 4400.0, 3000.0, 4600.0, 3425.0, 2975.0, 3450.0, 4150.0, 3500.0, 4300.0, 3450.0, 4050.0, 2900.0, 3700.0, 3550.0, 3800.0, 2850.0, 3750.0, 3150.0, 4400.0, 3600.0, 4050.0, 2850.0, 3950.0, 3350.0, 4100.0, 3050.0, 4450.0, 3600.0, 3900.0, 3550.0, 4150.0, 3700.0, 4250.0, 3700.0, 3900.0, 3550.0, 4000.0, 3200.0, 4700.0, 3800.0, 4200.0, 3350.0, 3550.0, 3800.0, 3500.0, 3950.0, 3600.0, 3550.0, 4300.0, 3400.0, 4450.0, 3300.0, 4300.0, 3700.0, 4350.0, 2900.0, 4100.0, 3725.0, 4725.0, 3075.0, 4250.0, 2925.0, 3550.0, 3750.0, 3900.0, 3175.0, 4775.0, 3825.0, 4600.0, 3200.0, 4275.0, 3900.0, 4075.0, 2900.0, 3775.0, 3350.0, 3325.0, 3150.0, 3500.0, 3450.0, 3875.0, 3050.0, 4000.0, 3275.0, 4300.0, 3050.0, 4000.0, 3325.0, 3500.0, 3500.0, 4475.0, 3425.0, 3900.0, 3175.0, 3975.0, 3400.0, 4250.0, 3400.0, 3475.0, 3050.0, 3725.0, 3000.0, 3650.0, 4250.0, 3475.0, 3450.0, 3750.0, 3700.0, 4000.0, 4500.0, 5700.0, 4450.0, 5700.0, 5400.0, 4550.0, 4800.0, 5200.0, 4400.0, 5150.0, 4650.0, 5550.0, 4650.0, 5850.0, 4200.0, 5850.0, 4150.0, 6300.0, 4800.0, 5350.0, 5700.0, 5000.0, 4400.0, 5050.0, 5000.0, 5100.0, 4100.0, 5650.0, 4600.0, 5550.0, 5250.0, 4700.0, 5050.0, 6050.0, 5150.0, 5400.0, 4950.0, 5250.0, 4350.0, 5350.0, 3950.0, 5700.0, 4300.0, 4750.0, 5550.0, 4900.0, 4200.0, 5400.0, 5100.0, 5300.0, 4850.0, 5300.0, 4400.0, 5000.0, 4900.0, 5050.0, 4300.0, 5000.0, 4450.0, 5550.0, 4200.0, 5300.0, 4400.0, 5650.0, 4700.0, 5700.0, 4650.0, 5800.0, 4700.0, 5550.0, 4750.0, 5000.0, 5100.0, 5200.0, 4700.0, 5800.0, 4600.0, 6000.0, 4750.0, 5950.0, 4625.0, 5450.0, 4725.0, 5350.0, 4750.0, 5600.0, 4600.0, 5300.0, 4875.0, 5550.0, 4950.0, 5400.0, 4750.0, 5650.0, 4850.0, 5200.0, 4925.0, 4875.0, 4625.0, 5250.0, 4850.0, 5600.0, 4975.0, 5500.0, 4725.0, 5500.0, 4700.0, 5500.0, 4575.0, 5500.0, 5000.0, 5950.0, 4650.0, 5500.0, 4375.0, 5850.0, 4875.0, 6000.0, 4925.0, 4850.0, 5750.0, 5200.0, 5400.0, 3500.0, 3900.0, 3650.0, 3525.0, 3725.0, 3950.0, 3250.0, 3750.0, 4150.0, 3700.0, 3800.0, 3775.0, 3700.0, 4050.0, 3575.0, 4050.0, 3300.0, 3700.0, 3450.0, 4400.0, 3600.0, 3400.0, 2900.0, 3800.0, 3300.0, 4150.0, 3400.0, 3800.0, 3700.0, 4550.0, 3200.0, 4300.0, 3350.0, 4100.0, 3600.0, 3900.0, 3850.0, 4800.0, 2700.0, 4500.0, 3950.0, 3650.0, 3550.0, 3500.0, 3675.0, 4450.0, 3400.0, 4300.0, 3250.0, 3675.0, 3325.0, 3950.0, 3600.0, 4050.0, 3350.0, 3450.0, 3250.0, 4050.0, 3800.0, 3525.0, 3950.0, 3650.0, 3650.0, 4000.0, 3400.0, 3775.0, 4100.0, 3775.0] ['male', 'female', 'female', 'female', 'male', 'female', 'male', 'male', 'male', 'male', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'male', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'male', 'female', 'male', 'female', 'female', 'male', 'female', 'male', 'male', 'female', 'female', 'male', 'female', 'male', 'female', 'male', 'female', 'male', 'male', 'female', 'male', 'female', 'female', 'male', 'female', 'male', 'male', 'female']

Categorical Encoding of categorical columns containing strings

Which columns contain non-numeric values? AKA – values other than integers and floats?

342 342 0 0 0 0 342
342 342 0 0 0 0 342

What categorical values are we dealing with?

{'Chinstrap', 'Adelie', 'Gentoo'} {'Biscoe', 'Dream', 'Torgersen'} {'female', 'male'}

How many of each do we have?

151 Adelie penguins 123 Gentoo penguins 68 Chinstrap penguins
167 penguins from Biscoe island. 51 penguins from Torgersen island. 124 penguins from Dream island.
177 male penguins 165 female penguins
[0, 0, 0, 0, 0] [1, 1, 1, 1, 1] [2, 2, 2, 2, 2]
[0, 1, 1, 1, 0] [0, 1, 0, 1, 0] [0, 1, 0, 0, 1]

Summary Statistics

  • 0 - Penguin Species
  • 1 - Island
  • 2 - Penguin Bill Length (in mm)
  • 3 - Penguin Bill Depth (in mm)
  • 4 - Penguin Flipper Length (in mm)
  • 5 - Penguin Body Mass (in grams)
  • 6 - Penguin Sex

Mean

average bill length in mm is: 43.9219298245614 average bill depth in mm is: 17.151169590643274 average flipper length in mm is: 200.91520467836258 average body mass in grams is: 4201.754385964912

Median

median bill length in mm is: 44.45 median bill depth in mm is: 17.3 median flipper length in mm is: 197.0 median body mass in grams is: 4050.0

Min

min bill length in mm is: 32.1 min bill depth in mm is: 13.1 min flipper length in mm is: 172.0 min body mass in grams is: 2700.0

Max

max bill length in mm is: 59.6 max bill depth in mm is: 21.5 max flipper length in mm is: 231.0 max body mass in grams is: 6300.0

Stratified Summary Statistics

[[0, 2, 39.1, 18.7, 181.0, 3750.0, 0], [0, 2, 39.5, 17.4, 186.0, 3800.0, 1], [0, 2, 40.3, 18.0, 195.0, 3250.0, 1], [0, 2, 36.7, 19.3, 193.0, 3450.0, 1], [0, 2, 39.3, 20.6, 190.0, 3650.0, 0]]
[[0, 2, 39.1, 18.7, 181.0, 3750.0, 0], [0, 2, 39.5, 17.4, 186.0, 3800.0, 1], [0, 2, 40.3, 18.0, 195.0, 3250.0, 1], [0, 2, 36.7, 19.3, 193.0, 3450.0, 1], [0, 2, 39.3, 20.6, 190.0, 3650.0, 0], [0, 2, 38.9, 17.8, 181.0, 3625.0, 1], [0, 2, 39.2, 19.6, 195.0, 4675.0, 0], [0, 2, 34.1, 18.1, 193.0, 3475.0, 0], [0, 2, 42.0, 20.2, 190.0, 4250.0, 0], [0, 2, 37.8, 17.1, 186.0, 3300.0, 0], [0, 2, 37.8, 17.3, 180.0, 3700.0, 0], [0, 2, 41.1, 17.6, 182.0, 3200.0, 1], [0, 2, 38.6, 21.2, 191.0, 3800.0, 0], [0, 2, 34.6, 21.1, 198.0, 4400.0, 0], [0, 2, 36.6, 17.8, 185.0, 3700.0, 1], [0, 2, 38.7, 19.0, 195.0, 3450.0, 1], [0, 2, 42.5, 20.7, 197.0, 4500.0, 0], [0, 2, 34.4, 18.4, 184.0, 3325.0, 1], [0, 2, 46.0, 21.5, 194.0, 4200.0, 0], [0, 0, 37.8, 18.3, 174.0, 3400.0, 1], [0, 0, 37.7, 18.7, 180.0, 3600.0, 0], [0, 0, 35.9, 19.2, 189.0, 3800.0, 1], [0, 0, 38.2, 18.1, 185.0, 3950.0, 0], [0, 0, 38.8, 17.2, 180.0, 3800.0, 0], [0, 0, 35.3, 18.9, 187.0, 3800.0, 1], [0, 0, 40.6, 18.6, 183.0, 3550.0, 0], [0, 0, 40.5, 17.9, 187.0, 3200.0, 1], [0, 0, 37.9, 18.6, 172.0, 3150.0, 1], [0, 0, 40.5, 18.9, 180.0, 3950.0, 0], [0, 1, 39.5, 16.7, 178.0, 3250.0, 1], [0, 1, 37.2, 18.1, 178.0, 3900.0, 0], [0, 1, 39.5, 17.8, 188.0, 3300.0, 1], [0, 1, 40.9, 18.9, 184.0, 3900.0, 0], [0, 1, 36.4, 17.0, 195.0, 3325.0, 1], [0, 1, 39.2, 21.1, 196.0, 4150.0, 0], [0, 1, 38.8, 20.0, 190.0, 3950.0, 0], [0, 1, 42.2, 18.5, 180.0, 3550.0, 1], [0, 1, 37.6, 19.3, 181.0, 3300.0, 1], [0, 1, 39.8, 19.1, 184.0, 4650.0, 0], [0, 1, 36.5, 18.0, 182.0, 3150.0, 1], [0, 1, 40.8, 18.4, 195.0, 3900.0, 0], [0, 1, 36.0, 18.5, 186.0, 3100.0, 1], [0, 1, 44.1, 19.7, 196.0, 4400.0, 0], [0, 1, 37.0, 16.9, 185.0, 3000.0, 1], [0, 1, 39.6, 18.8, 190.0, 4600.0, 0], [0, 1, 41.1, 19.0, 182.0, 3425.0, 0], [0, 1, 37.5, 18.9, 179.0, 2975.0, 0], [0, 1, 36.0, 17.9, 190.0, 3450.0, 1], [0, 1, 42.3, 21.2, 191.0, 4150.0, 0], [0, 0, 39.6, 17.7, 186.0, 3500.0, 1], [0, 0, 40.1, 18.9, 188.0, 4300.0, 0], [0, 0, 35.0, 17.9, 190.0, 3450.0, 1], [0, 0, 42.0, 19.5, 200.0, 4050.0, 0], [0, 0, 34.5, 18.1, 187.0, 2900.0, 1], [0, 0, 41.4, 18.6, 191.0, 3700.0, 0], [0, 0, 39.0, 17.5, 186.0, 3550.0, 1], [0, 0, 40.6, 18.8, 193.0, 3800.0, 0], [0, 0, 36.5, 16.6, 181.0, 2850.0, 1], [0, 0, 37.6, 19.1, 194.0, 3750.0, 0], [0, 0, 35.7, 16.9, 185.0, 3150.0, 1], [0, 0, 41.3, 21.1, 195.0, 4400.0, 0], [0, 0, 37.6, 17.0, 185.0, 3600.0, 1], [0, 0, 41.1, 18.2, 192.0, 4050.0, 0], [0, 0, 36.4, 17.1, 184.0, 2850.0, 1], [0, 0, 41.6, 18.0, 192.0, 3950.0, 0], [0, 0, 35.5, 16.2, 195.0, 3350.0, 1], [0, 0, 41.1, 19.1, 188.0, 4100.0, 0], [0, 2, 35.9, 16.6, 190.0, 3050.0, 1], [0, 2, 41.8, 19.4, 198.0, 4450.0, 0], [0, 2, 33.5, 19.0, 190.0, 3600.0, 1], [0, 2, 39.7, 18.4, 190.0, 3900.0, 0], [0, 2, 39.6, 17.2, 196.0, 3550.0, 1], [0, 2, 45.8, 18.9, 197.0, 4150.0, 0], [0, 2, 35.5, 17.5, 190.0, 3700.0, 1], [0, 2, 42.8, 18.5, 195.0, 4250.0, 0], [0, 2, 40.9, 16.8, 191.0, 3700.0, 1], [0, 2, 37.2, 19.4, 184.0, 3900.0, 0], [0, 2, 36.2, 16.1, 187.0, 3550.0, 1], [0, 2, 42.1, 19.1, 195.0, 4000.0, 0], [0, 2, 34.6, 17.2, 189.0, 3200.0, 1], [0, 2, 42.9, 17.6, 196.0, 4700.0, 0], [0, 2, 36.7, 18.8, 187.0, 3800.0, 1], [0, 2, 35.1, 19.4, 193.0, 4200.0, 0], [0, 1, 37.3, 17.8, 191.0, 3350.0, 1], [0, 1, 41.3, 20.3, 194.0, 3550.0, 0], [0, 1, 36.3, 19.5, 190.0, 3800.0, 0], [0, 1, 36.9, 18.6, 189.0, 3500.0, 1], [0, 1, 38.3, 19.2, 189.0, 3950.0, 0], [0, 1, 38.9, 18.8, 190.0, 3600.0, 1], [0, 1, 35.7, 18.0, 202.0, 3550.0, 1], [0, 1, 41.1, 18.1, 205.0, 4300.0, 0], [0, 1, 34.0, 17.1, 185.0, 3400.0, 1], [0, 1, 39.6, 18.1, 186.0, 4450.0, 0], [0, 1, 36.2, 17.3, 187.0, 3300.0, 1], [0, 1, 40.8, 18.9, 208.0, 4300.0, 0], [0, 1, 38.1, 18.6, 190.0, 3700.0, 1], [0, 1, 40.3, 18.5, 196.0, 4350.0, 0], [0, 1, 33.1, 16.1, 178.0, 2900.0, 1], [0, 1, 43.2, 18.5, 192.0, 4100.0, 0], [0, 0, 35.0, 17.9, 192.0, 3725.0, 1], [0, 0, 41.0, 20.0, 203.0, 4725.0, 0], [0, 0, 37.7, 16.0, 183.0, 3075.0, 1], [0, 0, 37.8, 20.0, 190.0, 4250.0, 0], [0, 0, 37.9, 18.6, 193.0, 2925.0, 1], [0, 0, 39.7, 18.9, 184.0, 3550.0, 0], [0, 0, 38.6, 17.2, 199.0, 3750.0, 1], [0, 0, 38.2, 20.0, 190.0, 3900.0, 0], [0, 0, 38.1, 17.0, 181.0, 3175.0, 1], [0, 0, 43.2, 19.0, 197.0, 4775.0, 0], [0, 0, 38.1, 16.5, 198.0, 3825.0, 1], [0, 0, 45.6, 20.3, 191.0, 4600.0, 0], [0, 0, 39.7, 17.7, 193.0, 3200.0, 1], [0, 0, 42.2, 19.5, 197.0, 4275.0, 0], [0, 0, 39.6, 20.7, 191.0, 3900.0, 1], [0, 0, 42.7, 18.3, 196.0, 4075.0, 0], [0, 2, 38.6, 17.0, 188.0, 2900.0, 1], [0, 2, 37.3, 20.5, 199.0, 3775.0, 0], [0, 2, 35.7, 17.0, 189.0, 3350.0, 1], [0, 2, 41.1, 18.6, 189.0, 3325.0, 0], [0, 2, 36.2, 17.2, 187.0, 3150.0, 1], [0, 2, 37.7, 19.8, 198.0, 3500.0, 0], [0, 2, 40.2, 17.0, 176.0, 3450.0, 1], [0, 2, 41.4, 18.5, 202.0, 3875.0, 0], [0, 2, 35.2, 15.9, 186.0, 3050.0, 1], [0, 2, 40.6, 19.0, 199.0, 4000.0, 0], [0, 2, 38.8, 17.6, 191.0, 3275.0, 1], [0, 2, 41.5, 18.3, 195.0, 4300.0, 0], [0, 2, 39.0, 17.1, 191.0, 3050.0, 1], [0, 2, 44.1, 18.0, 210.0, 4000.0, 0], [0, 2, 38.5, 17.9, 190.0, 3325.0, 1], [0, 2, 43.1, 19.2, 197.0, 3500.0, 0], [0, 1, 36.8, 18.5, 193.0, 3500.0, 1], [0, 1, 37.5, 18.5, 199.0, 4475.0, 0], [0, 1, 38.1, 17.6, 187.0, 3425.0, 1], [0, 1, 41.1, 17.5, 190.0, 3900.0, 0], [0, 1, 35.6, 17.5, 191.0, 3175.0, 1], [0, 1, 40.2, 20.1, 200.0, 3975.0, 0], [0, 1, 37.0, 16.5, 185.0, 3400.0, 1], [0, 1, 39.7, 17.9, 193.0, 4250.0, 0], [0, 1, 40.2, 17.1, 193.0, 3400.0, 1], [0, 1, 40.6, 17.2, 187.0, 3475.0, 0], [0, 1, 32.1, 15.5, 188.0, 3050.0, 1], [0, 1, 40.7, 17.0, 190.0, 3725.0, 0], [0, 1, 37.3, 16.8, 192.0, 3000.0, 1], [0, 1, 39.0, 18.7, 185.0, 3650.0, 0], [0, 1, 39.2, 18.6, 190.0, 4250.0, 0], [0, 1, 36.6, 18.4, 184.0, 3475.0, 1], [0, 1, 36.0, 17.8, 195.0, 3450.0, 1], [0, 1, 37.8, 18.1, 193.0, 3750.0, 0], [0, 1, 36.0, 17.1, 187.0, 3700.0, 1], [0, 1, 41.5, 18.5, 201.0, 4000.0, 0]]
average bill length in mm is: 38.79139072847682 median bill length in mm is: 38.8 min bill length in mm is: 32.1 max bill length in mm is: 46.0 -------------------------------------------------- average bill depth in mm is: 18.34635761589404 median bill depth in mm is: 18.4 min bill depth in mm is: 15.5 max bill depth in mm is: 21.5 -------------------------------------------------- average flipper length in mm is: 189.95364238410596 median flipper length in mm is: 190.0 min flipper length in mm is: 172.0 max flipper length in mm is: 210.0 -------------------------------------------------- average mass in g is: 3700.662251655629 median mass in g is: 3700.0 min mass in g is: 2850.0 max mass in g is: 4775.0
average bill length in mm is: 47.50487804878049 median bill length in mm is: 47.3 min bill length in mm is: 40.9 max bill length in mm is: 59.6 -------------------------------------------------- average bill depth in mm is: 14.982113821138212 median bill depth in mm is: 15.0 min bill depth in mm is: 13.1 max bill depth in mm is: 17.3 -------------------------------------------------- average flipper length in mm is: 217.1869918699187 median flipper length in mm is: 216.0 min flipper length in mm is: 203.0 max flipper length in mm is: 231.0 -------------------------------------------------- average mass in g is: 5076.016260162602 median mass in g is: 5000.0 min mass in g is: 3950.0 max mass in g is: 6300.0
average bill length in mm is: 48.83382352941177 median bill length in mm is: 49.55 min bill length in mm is: 40.9 max bill length in mm is: 58.0 -------------------------------------------------- average bill depth in mm is: 18.42058823529412 median bill depth in mm is: 18.45 min bill depth in mm is: 16.4 max bill depth in mm is: 20.8 -------------------------------------------------- average flipper length in mm is: 195.8235294117647 median flipper length in mm is: 196.0 min flipper length in mm is: 178.0 max flipper length in mm is: 212.0 -------------------------------------------------- average mass in g is: 3733.0882352941176 median mass in g is: 3700.0 min mass in g is: 2700.0 max mass in g is: 4800.0

Split into train and test datasets

  • randomly select 2/3 of the observations for training data
  • randomly select 1/3 of the observations for test data
228
[[0, 2, 39.1, 18.7, 181.0, 3750.0, 0], [0, 2, 39.5, 17.4, 186.0, 3800.0, 1], [0, 2, 40.3, 18.0, 195.0, 3250.0, 1], [0, 2, 36.7, 19.3, 193.0, 3450.0, 1], [0, 2, 39.3, 20.6, 190.0, 3650.0, 0]]
[[0, 0, 40.5, 18.9, 180.0, 3950.0, 0], [2, 1, 50.2, 18.7, 198.0, 3775.0, 1], [1, 0, 50.8, 17.3, 228.0, 5600.0, 0], [1, 0, 47.7, 15.0, 216.0, 4750.0, 1], [2, 1, 49.8, 17.3, 198.0, 3675.0, 1]]
228
114

Fit a Decision Tree Model

  • 0 - Penguin Species
  • 1 - Island
  • 2 - Penguin Bill Length (in mm)
  • 3 - Penguin Bill Depth (in mm)
  • 4 - Penguin Flipper Length (in mm)
  • 5 - Penguin Body Mass (in grams)
  • 6 - Penguin Sex

Penguin Category Labels:

  • Adelie: 0
  • Gentoo: 1
  • Chinstrap: 2

Baseline Accuracy

[1, 0, 2, 1, 1, 1, 2, 0, 2, 0, 0, 2, 0, 2, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 2, 0, 1, 0, 0, 1, 0, 0, 2, 0, 1, 0, 2, 0, 0, 0, 1, 0, 1, 0, 1, 0, 2, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 1, 0, 2, 2, 0, 0, 1, 2, 0, 0, 2, 2, 2, 1, 0, 1, 2, 1, 2, 0, 0, 2, 1, 0, 0, 0, 0, 1, 0, 2, 2, 0, 0, 1, 2, 1, 1, 1, 0, 0, 0, 1, 1, 1, 2, 2, 0, 1]
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
0.5

Use a heuristic to identify chinstrap penguins

[0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 2, 0, 2, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 2, 0, 2]
0.6403508771929824

Use a heuristic to identify chinstrap and gentoo penguins.

[1, 0, 2, 1, 1, 1, 2, 0, 0, 0, 0, 1, 0, 2, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 2, 1, 1, 0, 0, 0, 0, 2, 0, 1, 0, 0, 1, 0, 0, 2, 0, 1, 0, 2, 0, 0, 0, 1, 0, 1, 0, 1, 0, 2, 0, 0, 0, 0, 2, 0, 1, 1, 0, 0, 0, 1, 0, 2, 2, 0, 2, 1, 2, 0, 0, 0, 2, 2, 1, 0, 1, 1, 1, 0, 0, 0, 2, 1, 0, 0, 0, 0, 1, 0, 2, 2, 0, 2, 1, 2, 1, 1, 1, 0, 0, 2, 1, 1, 1, 2, 2, 0, 2]
0.9035087719298246