Skip to content

Instantly share code, notes, and snippets.

@UrusuLambda
Created August 14, 2020 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save UrusuLambda/caa4692dcfab9d9dd71ebd7770f37589 to your computer and use it in GitHub Desktop.
Save UrusuLambda/caa4692dcfab9d9dd71ebd7770f37589 to your computer and use it in GitHub Desktop.
df_train=pd.DataFrame(x_train_transformed_3d[:, 0:3],columns=list("XYZ"))
df_train["label"]=np.array(y_train)
df_train['purpose'] = np.full(y_train.shape, "train")
df_test=pd.DataFrame(x_test_transformed_3d[:, 0:3],columns=list("XYZ"))
df_test["label"]=np.array(y_test)
df_test['purpose'] = np.full(y_test.shape, "test")
df_merged = pd.concat([df_train, df_test])
fig = px.scatter_3d(df_merged, x='X', y='Y', z='Z', color='label', symbol='purpose', size_max=4, opacity=0.7)
fig.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment