Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. {
  2. "cells": [
  3. {
  4. "metadata": {
  5. "trusted": true
  6. },
  7. "cell_type": "code",
  8. "source": "# Build the distance matrix\nM = np.empty((len(player_distributions), \n len(player_distributions)))\nfor i, pl1 in enumerate(player_distributions):\n for j, pl2 in enumerate(player_distributions):\n M[i, j] = wasserstein(player_distributions[pl1], \n player_distributions[pl2])\n# Upper diagonal\nupper_M = M[np.triu_indices(len(player_distributions), k = 1)]",
  9. "execution_count": null,
  10. "outputs": []
  11. }
  12. ],
  13. "metadata": {
  14. "kernelspec": {
  15. "name": "python3",
  16. "display_name": "Python 3",
  17. "language": "python"
  18. },
  19. "language_info": {
  20. "name": "python",
  21. "version": "3.6.3",
  22. "mimetype": "text/x-python",
  23. "codemirror_mode": {
  24. "name": "ipython",
  25. "version": 3
  26. },
  27. "pygments_lexer": "ipython3",
  28. "nbconvert_exporter": "python",
  29. "file_extension": ".py"
  30. },
  31. "toc": {
  32. "nav_menu": {},
  33. "number_sections": true,
  34. "sideBar": true,
  35. "skip_h1_title": false,
  36. "toc_cell": false,
  37. "toc_position": {
  38. "height": "483.41033935546875px",
  39. "left": "0px",
  40. "right": "1362px",
  41. "top": "109.57880401611328px",
  42. "width": "119.0081558227539px"
  43. },
  44. "toc_section_display": "block",
  45. "toc_window_display": true
  46. },
  47. "varInspector": {
  48. "cols": {
  49. "lenName": 16,
  50. "lenType": 16,
  51. "lenVar": 40
  52. },
  53. "kernels_config": {
  54. "python": {
  55. "delete_cmd_postfix": "",
  56. "delete_cmd_prefix": "del ",
  57. "library": "var_list.py",
  58. "varRefreshCmd": "print(var_dic_list())"
  59. },
  60. "r": {
  61. "delete_cmd_postfix": ") ",
  62. "delete_cmd_prefix": "rm(",
  63. "library": "var_list.r",
  64. "varRefreshCmd": "cat(var_dic_list()) "
  65. }
  66. },
  67. "types_to_exclude": [
  68. "module",
  69. "function",
  70. "builtin_function_or_method",
  71. "instance",
  72. "_Feature"
  73. ],
  74. "window_display": false
  75. },
  76. "gist_id": "c2d9b00b44ca7ecbb320bc7fb138ee08"
  77. },
  78. "nbformat": 4,
  79. "nbformat_minor": 4
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement