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 254 kB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {
  2. "cells": [
  3. {
  4. "cell_type": "code",
  5. "execution_count": 1,
  6. "metadata": {
  7. "scrolled": false
  8. },
  9. "outputs": [
  10. {
  11. "name": "stdout",
  12. "output_type": "stream",
  13. "text": [
  14. "\n",
  15. "Acyclic\n",
  16. "\n",
  17. "--- This is a regression 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. "getting sp graphs: 100%|██████████| 183/183 [00:00<00:00, 2750.49it/s]\n",
  27. "calculating kernels: 100%|█████████▉| 16808/16836.0 [00:11<00:00, 607.39it/s] \n",
  28. " --- shortest path kernel matrix of size 183 built in 11.701499700546265 seconds ---\n",
  29. "calculating kernels: 100%|██████████| 16836/16836.0 [00:11<00:00, 1447.26it/s]\n",
  30. "\n",
  31. "the gram matrix with parameters {'node_kernels': {'symb': <function deltakernel at 0x7f7e8eb76730>, 'nsymb': <function rbf_kernel at 0x7f7e8a6e0f28>, 'mix': functools.partial(<function kernelsum at 0x7f7e8eb76840>, <function deltakernel at 0x7f7e8eb76730>, <function rbf_kernel at 0x7f7e8a6e0f28>)}} is: \n",
  32. "[[1. 0.47140452 0.33333333 ... 0.30151134 0.30512858 0.27852425]\n",
  33. " [0.47140452 1. 0. ... 0.14213381 0.11986583 0.17232809]\n",
  34. " [0.33333333 0. 1. ... 0.36851387 0.37293493 0.34815531]\n",
  35. " ...\n",
  36. " [0.30151134 0.14213381 0.36851387 ... 1. 0.96429344 0.95175317]\n",
  37. " [0.30512858 0.11986583 0.37293493 ... 0.96429344 1. 0.96671243]\n",
  38. " [0.27852425 0.17232809 0.34815531 ... 0.95175317 0.96671243 1. ]]\n"
  39. ]
  40. },
  41. {
  42. "data": {

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