Created
May 19, 2021 09:30
-
-
Save 18182324/aaa74a3181ebe0dba8855487895c945d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Reordering so x values are in increasiong order | |
order_idx_train=np.squeeze(x_train.argsort(axis=0)) | |
x_train=x_train[order_idx_train] | |
y_train=y_train[order_idx_train] | |
order_idx_val=np.squeeze(x_val.argsort(axis=0)) | |
x_val=x_val[order_idx_val] | |
y_val=y_val[order_idx_val] | |
order_idx_test=np.squeeze(x_test.argsort(axis=0)) | |
x_test=x_test[order_idx_test] | |
y_test=y_test[order_idx_test] | |
plt.figure(figsize=(14,5)) | |
plt.subplot(1,2,1) | |
plt.scatter(x_train,y_train,color="steelblue") | |
plt.xlabel("x",size=16) | |
plt.ylabel("y",size=16) | |
plt.title("train data") | |
plt.xlim([-1.5,6.5]) | |
plt.ylim([-30,55]) | |
plt.subplot(1,2,2) | |
plt.scatter(x_val,y_val,facecolors='none', edgecolors="steelblue") | |
plt.xlabel("x",size=16) | |
plt.ylabel("y",size=16) | |
plt.title("validation data") | |
plt.xlim([-1.5,6.5]) | |
plt.ylim([-30,55]) | |
plt.savefig("5.fish.split.pdf") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment