Skip to content
Snippets Groups Projects
Commit 5866d4cd authored by bjje's avatar bjje
Browse files

name changes ex4

parent b2799b12
Branches
No related tags found
No related merge requests found
# exercise 2.1.1 # exercise 2.1.2
import numpy as np import numpy as np
x = np.array([-0.68, -2.11, 2.39, 0.26, 1.46, 1.33, 1.03, -0.41, -0.33, 0.47]) x = np.array([-0.68, -2.11, 2.39, 0.26, 1.46, 1.33, 1.03, -0.41, -0.33, 0.47])
......
...@@ -121,6 +121,8 @@ print("Distance after scaling all attributes: %s \n\n" % dist_firstandlast) ...@@ -121,6 +121,8 @@ print("Distance after scaling all attributes: %s \n\n" % dist_firstandlast)
# Try to change the scale of one of the attributes in both wines and see the effect on the distance # Try to change the scale of one of the attributes in both wines and see the effect on the distance
x_red = np.copy(X[0,:]) x_red = np.copy(X[0,:])
x_white = np.copy(X[-1,:]) x_white = np.copy(X[-1,:])
print("x_red: %s" % x_red)
print("x_white: %s" % x_white)
sf = 1000 sf = 1000
x_white[1] = sf*x_white[1] x_white[1] = sf*x_white[1]
x_red[1] = sf*x_red[1] x_red[1] = sf*x_red[1]
...@@ -253,5 +255,5 @@ raise NotImplementedError() ...@@ -253,5 +255,5 @@ raise NotImplementedError()
#%% #%%
print("You are now done with this exercise. ASk your TA to look over your solutions and discuss your findings with them.")#%% print("You are now done with this exercise. Ask your TA to look over your solutions and discuss your findings with them.")#%%
# %% # %%
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment