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_pathkernel.ipynb 301 kB

123456789101112131415161718192021222324252627282930313233343536373839
  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. "getting shortest paths: 100%|██████████| 183/183 [00:00<00:00, 3803.50it/s]\n",
  24. "calculating kernels: 100%|█████████▉| 16817/16836.0 [00:13<00:00, 484.77it/s] \n",
  25. " --- mean average path kernel matrix of size 183 built in 13.229421854019165 seconds ---\n",
  26. "calculating kernels: 100%|██████████| 16836/16836.0 [00:13<00:00, 1277.44it/s]\n",
  27. "\n",
  28. "the gram matrix is: \n",
  29. "[[1. 0.74535599 0.4 ... 0.33709993 0.35355339 0.35028472]\n",
  30. " [0.74535599 1. 0.2981424 ... 0.25125945 0.26352314 0.26108682]\n",
  31. " [0.4 0.2981424 1. ... 0.43822991 0.45961941 0.45537014]\n",
  32. " ...\n",
  33. " [0.33709993 0.25125945 0.43822991 ... 1. 0.80150449 0.76752621]\n",
  34. " [0.35355339 0.26352314 0.45961941 ... 0.80150449 1. 0.81737272]\n",
  35. " [0.35028472 0.26108682 0.45537014 ... 0.76752621 0.81737272 1. ]]\n"
  36. ]
  37. },
  38. {
  39. "data": {

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