You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

run_spkernel.ipynb 180 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. {
  2. "cells": [
  3. {
  4. "cell_type": "code",
  5. "execution_count": null,
  6. "metadata": {
  7. "scrolled": false
  8. },
  9. "outputs": [
  10. {
  11. "name": "stdout",
  12. "output_type": "stream",
  13. "text": [
  14. "\n",
  15. "Letter-med\n",
  16. "\n",
  17. "--- This is a classification problem ---\n",
  18. "\n",
  19. "\n",
  20. "I. Loading dataset from file...\n",
  21. "\n",
  22. "2. Calculating gram matrices. This could take a while...\n",
  23. "\n",
  24. " None edge weight specified. Set all weight to 1.\n",
  25. "\n",
  26. "\n",
  27. " 9 graphs are removed as they don't contain edges.\n",
  28. "\n",
  29. "getting sp graphs: 2241it [00:01, 2167.27it/s]\n",
  30. "calculating kernels: 2512161it [35:21, 1183.88it/s]\n",
  31. "\n",
  32. " --- shortest path kernel matrix of size 2241 built in 2123.1229825019836 seconds ---\n",
  33. "\n",
  34. "the gram matrix with parameters {'n_jobs': 8, 'node_kernels': {'symb': <function deltakernel at 0x7ff7faecad08>, 'mix': functools.partial(<function kernelsum at 0x7ff7fae8a0d0>, <function deltakernel at 0x7ff7faecad08>, <function rbf_kernel at 0x7ff7fe535158>), 'nsymb': <function rbf_kernel at 0x7ff7fe535158>}} is: \n",
  35. "[[1. 0.12737447 0.24414863 ... 0.08575717 0.24779506 0.13389497]\n",
  36. " [0.12737447 1. 0.26175695 ... 0.45546182 0.49016833 0.67892735]\n",
  37. " [0.24414863 0.26175695 1. ... 0.3161496 0.27686542 0.26213761]\n",
  38. " ...\n",
  39. " [0.08575717 0.45546182 0.3161496 ... 1. 0.47821266 0.36507203]\n",
  40. " [0.24779506 0.49016833 0.27686542 ... 0.47821266 1. 0.58909 ]\n",
  41. " [0.13389497 0.67892735 0.26213761 ... 0.36507203 0.58909 1. ]]\n"
  42. ]
  43. },
  44. {
  45. "data": {

A Python package for graph kernels, graph edit distances and graph pre-image problem.