Warning
This page is located in archive. Go to the latest version of this course pages.

NumPy Cheat Sheet - useful for those new to numpy.

Animals dataset for Python

import numpy as np
 
animals_interpretations = np.array([
  [1, 1, 0, 0, 0, 1, 1, 0],
  [0, 0, 1, 0, 0, 1, 1, 1],
  [0, 0, 0, 0, 0, 1, 0, 0],
  [1, 0, 0, 0, 0, 1, 0, 0],
  [0, 0, 1, 0, 1, 0, 1, 0],
  [0, 0, 0, 0, 1, 1, 1, 0],
  [0, 0, 0, 1, 0, 1, 1, 0],
  [1, 0, 0, 1, 0, 1, 1, 0],
  [0, 1, 0, 0, 0, 1, 1, 0],
  [0, 1, 1, 0, 0, 1, 1, 0],
  [0, 0, 0, 0, 0, 1, 1, 1],
  [0, 0, 1, 0, 0, 1, 1, 0],
  [0, 0, 0, 0, 0, 1, 1, 0],
  ], dtype=bool)

animals_evaluations = np.array(
  [1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1],
  dtype=bool)

labels_x = "Flies", "Hair", "Fins", "Feathers", "Scales", "Breathes air", \
      "Bones", "Funky nose"
labels_y = "Bat", "Dolphin", "Earthworm", "Bee", "Carp", "T-Rex", "Penguin", \
      "Parrot", "Goat", "Platypus", "Elephant", "Frog", "Hippo"
courses/smu/tutorials/tutorial3.txt · Last modified: 2020/02/11 16:46 (external edit)