Advertisement
ProgNeo

Untitled

Oct 14th, 2022
1,074
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. !pip install neupy
  2. from neupy import algorithms
  3. pnn = algorithms.PNN(std=10, verbose=False)
  4. pnn.train(X_train, y_train)
  5. Y_train_predict = pnn.predict(X_train)
  6. print(Y_train_predict)
  7. r = confusion_matrix(y_train, Y_train_predict)
  8. print(r)
  9. fig3 = go.Figure(data=[
  10.     go.Scatter3d(
  11.         x=X_train[:,0], y=X_train[:,1], z=X_train[:,2], mode='markers', marker=dict(size=4, color=Y_train_predict)
  12.         )
  13.     ])
  14. fig3.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement