Skip to content

Instantly share code, notes, and snippets.

@patricoferris
Created October 2, 2019 13:34
Show Gist options
  • Save patricoferris/20696eb822099469dd8bc90f1083f9d1 to your computer and use it in GitHub Desktop.
Save patricoferris/20696eb822099469dd8bc90f1083f9d1 to your computer and use it in GitHub Desktop.
# Get the New York temperatures
n = 20
new_york_temp = city_temps.loc[city_temps['City'] == "New York"][-n:]
temps = np.array(new_york_temp["AverageTemperature"])
temps = temps / np.linalg.norm(temps)
# Extract some random training points from the 20 we are using (set random seed for reproducibility)
training_points = np.atleast_2d([1, 5, 7, 10, 14, 16, 19]).T
np.random.seed(20)
train_temp = temps[training_points]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment