diff --git a/.gitignore b/.gitignore
index 54bacccab3..b0369424cd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -94,5 +94,5 @@ virtualenv
ci.sh
# PyCharm.
-#.idea/
+.idea/sonarlint/
diff --git a/.idea/graphkit-learn.iml b/.idea/graphkit-learn.iml
index a88425883b..4ac444dbde 100644
--- a/.idea/graphkit-learn.iml
+++ b/.idea/graphkit-learn.iml
@@ -20,7 +20,7 @@
-
+
@@ -28,6 +28,9 @@
+
+
+
diff --git a/.idea/misc.xml b/.idea/misc.xml
index f916a58f69..73e4b311c2 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,4 +1,10 @@
-
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/sonarlint/issuestore/0/a/0aa36dd3888601b15ef73b970692ae7db93a2f8f b/.idea/sonarlint/issuestore/0/a/0aa36dd3888601b15ef73b970692ae7db93a2f8f
index 258e1b93b5..ace8e64de2 100644
--- a/.idea/sonarlint/issuestore/0/a/0aa36dd3888601b15ef73b970692ae7db93a2f8f
+++ b/.idea/sonarlint/issuestore/0/a/0aa36dd3888601b15ef73b970692ae7db93a2f8f
@@ -6,27 +6,30 @@ Bpython:S125"Remove this commented out code.(ꬩ
|python:S57179"]Change this default value to "None" and initialize this parameter inside the function/method.(8ڵŏ0
{python:S5717:"]Change this default value to "None" and initialize this parameter inside the function/method.(-8ڵŏ0
=python:S125>"Remove this commented out code.(ܭ8ڵŏ0
-=python:S125O"Remove this commented out code.(ñ8ڵŏ0
-ppython:S117]"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ڵŏ0
-Bpython:S125o"Remove this commented out code.(8ڵŏ0
-=python:S125{"Remove this commented out code.(8ڵŏ0
-qpython:S117"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(ѯ8ڵŏ0
-lpython:S117"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ڵŏ0
-~python:S1186"YAdd a nested comment explaining why this method is empty, or complete the implementation.(8ڵŏ0
-ypython:S1186"YAdd a nested comment explaining why this method is empty, or complete the implementation.(8ڵŏ0
-lpython:S117"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(Ҍ8ڵŏ0
-qpython:S117"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ڵŏ0
-vpython:S117"WRename this local variable "Y_copy" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ڵŏ0
->python:S125"Remove this commented out code.(8ڵŏ0
-lpython:S117"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(ͯ8ڵŏ0
-lpython:S117"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(ͯ8ڵŏ0
-qpython:S117"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ڵŏ0
-]python:S112">Replace this generic exception class with a more specific one.(ڿ8ڵŏ0
-lpython:S117"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ڵŏ0
-tpython:S117"URename this parameter "Y_targets" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ڵŏ0
-bpython:S112">Replace this generic exception class with a more specific one.(ֵ8ڵŏ0
-mpython:S117"NRename this parameter "Gi" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ڵŏ0
-mpython:S117"NRename this parameter "Gj" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ڵŏ0
-Cpython:S125"Remove this commented out code.(ǟ8ڵŏ0
-Cpython:S125"Remove this commented out code.(ǖ8ڵŏ0
-=python:S125"Remove this commented out code.(8ڵŏ0
\ No newline at end of file
+=python:S125P"Remove this commented out code.(ñ8ڵŏ0
+ppython:S117^"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ڵŏ0
+Bpython:S125p"Remove this commented out code.(8ڵŏ0
+=python:S125|"Remove this commented out code.(8ڵŏ0
+qpython:S117"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(ѯ8ڵŏ0
+lpython:S117"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
+~python:S1186"YAdd a nested comment explaining why this method is empty, or complete the implementation.(8ڵŏ0
+ypython:S1186"YAdd a nested comment explaining why this method is empty, or complete the implementation.(8ڵŏ0
+lpython:S117"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(Ҍ8ڵŏ0
+qpython:S117"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ڵŏ0
+vpython:S117"WRename this local variable "Y_copy" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ڵŏ0
+>python:S125"Remove this commented out code.(8ڵŏ0
+lpython:S117"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(ͯ8ڵŏ0
+lpython:S117"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(ͯ8ڵŏ0
+qpython:S117"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ڵŏ0
+]python:S112">Replace this generic exception class with a more specific one.(ڿ8ڵŏ0
+lpython:S117"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ڵŏ0
+tpython:S117"URename this parameter "Y_targets" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ڵŏ0
+dpython:S6711"DUse a "numpy.random.Generator" here instead of this legacy function.(81
+bpython:S112">Replace this generic exception class with a more specific one.(ֵ8ڵŏ0
+mpython:S117"NRename this parameter "Gi" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ڵŏ0
+mpython:S117"NRename this parameter "Gj" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ڵŏ0
+Zpython:S1481"5Replace unused local variable "pi_backward" with "_".(ϔ8Ƶ1
+Ypython:S1481"4Replace unused local variable "pi_forward" with "_".(ϔ8Ƶ1
+Cpython:S125"Remove this commented out code.(ǟ8ڵŏ0
+Cpython:S125"Remove this commented out code.(ǖ8ڵŏ0
+=python:S125"Remove this commented out code.(81
\ No newline at end of file
diff --git a/.idea/sonarlint/issuestore/1/d/1d5a8bee7114cbb604f132a1c5834c6ba0031053 b/.idea/sonarlint/issuestore/1/d/1d5a8bee7114cbb604f132a1c5834c6ba0031053
index 4c230f8cb2..23ce10285b 100644
--- a/.idea/sonarlint/issuestore/1/d/1d5a8bee7114cbb604f132a1c5834c6ba0031053
+++ b/.idea/sonarlint/issuestore/1/d/1d5a8bee7114cbb604f132a1c5834c6ba0031053
@@ -1,13 +1,13 @@
-wpython:S1192"RDefine a constant instead of duplicating this literal 'Computing kernels' 4 times.(81
-ppython:S117H"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(ſ81
-ppython:S117H"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(ſ81
-python:S117W"cRename this local variable "if_comp_X_sp_lists" to match the regular expression ^[_a-z][a-z0-9_]*$.(Ђ8Ν1
-hpython:S5632n"IChange this code so that it raises an object deriving from BaseException.(܀81
-qpython:S117"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
-ypython:S3776"TRefactor this function to reduce its Cognitive Complexity from 92 to the 15 allowed.(81
-\python:S112">Replace this generic exception class with a more specific one.(%81
-upython:S3776"URefactor this function to reduce its Cognitive Complexity from 109 to the 15 allowed.(81
-\python:S112">Replace this generic exception class with a more specific one.(%81
-tpython:S3776"TRefactor this function to reduce its Cognitive Complexity from 25 to the 15 allowed.(81
-Hpython:S108")Either remove or fill this block of code.(۾81
\ No newline at end of file
+wpython:S1192"RDefine a constant instead of duplicating this literal 'Computing kernels' 4 times.(81
+ppython:S117H"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(ſ81
+ppython:S117H"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(ſ81
+python:S117W"cRename this local variable "if_comp_X_sp_lists" to match the regular expression ^[_a-z][a-z0-9_]*$.(Ђ81
+hpython:S5632n"IChange this code so that it raises an object deriving from BaseException.(܀81
+qpython:S117"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
+ypython:S3776"TRefactor this function to reduce its Cognitive Complexity from 92 to the 15 allowed.(81
+\python:S112">Replace this generic exception class with a more specific one.(%81
+upython:S3776"URefactor this function to reduce its Cognitive Complexity from 109 to the 15 allowed.(81
+\python:S112">Replace this generic exception class with a more specific one.(%81
+tpython:S3776"TRefactor this function to reduce its Cognitive Complexity from 25 to the 15 allowed.(81
+Hpython:S108")Either remove or fill this block of code.(۾81
\ No newline at end of file
diff --git a/.idea/sonarlint/issuestore/2/3/23e24467d9801338cf98edc09aee81f19b0d2bfa b/.idea/sonarlint/issuestore/2/3/23e24467d9801338cf98edc09aee81f19b0d2bfa
index b7ed32f1b4..9771add92d 100644
--- a/.idea/sonarlint/issuestore/2/3/23e24467d9801338cf98edc09aee81f19b0d2bfa
+++ b/.idea/sonarlint/issuestore/2/3/23e24467d9801338cf98edc09aee81f19b0d2bfa
@@ -2,8 +2,8 @@
mpython:S1192"ODefine a constant instead of duplicating this literal 'computing GEDs' 4 times.(ʩ
;python:S125"Remove this commented out code.(
npython:S117&"WRename this local variable "listID" to match the regular expression ^[_a-z][a-z0-9_]*$.(
-Ipython:S1172@",Remove the unused function parameter "sort".(́
Mpython:S1172@"0Remove the unused function parameter "parallel".(́
+Ipython:S1172@",Remove the unused function parameter "sort".(́
Lpython:S1172@"/Remove the unused function parameter "verbose".(́
npython:S117S"WRename this local variable "listID" to match the regular expression ^[_a-z][a-z0-9_]*$.(
=python:S1481_"%Remove the unused local variable "i".(
@@ -34,6 +34,5 @@ Apython:S1110
rpython:S3776"TRefactor this function to reduce its Cognitive Complexity from 42 to the 15 allowed.(
7python:S125"Remove this commented out code.(ɛ
Apython:S1481"(Remove the unused local variable "n_vs".(
-Fpython:S1481"(Remove the unused local variable "n_vs".(㗹
rpython:S3776"TRefactor this function to reduce its Cognitive Complexity from 23 to the 15 allowed.(
7python:S125"Remove this commented out code.(ɛ
\ No newline at end of file
diff --git a/.idea/sonarlint/issuestore/3/d/3d5d4f5096623dc263aad46858b9fba3a1540e2f b/.idea/sonarlint/issuestore/3/d/3d5d4f5096623dc263aad46858b9fba3a1540e2f
index e69de29bb2..29c34c8013 100644
--- a/.idea/sonarlint/issuestore/3/d/3d5d4f5096623dc263aad46858b9fba3a1540e2f
+++ b/.idea/sonarlint/issuestore/3/d/3d5d4f5096623dc263aad46858b9fba3a1540e2f
@@ -0,0 +1,37 @@
+
+Bpython:S125"Remove this commented out code.(8փ1
+_python:S5720":Rename "Gn" to "self" or add the missing "self" parameter.(8փ1
+_python:S5720":Rename "Gn" to "self" or add the missing "self" parameter.(Ѐ8փ1
+_python:S5720":Rename "Gn" to "self" or add the missing "self" parameter.(܇8փ1
+rpython:S117"SRename this local variable "Gn" to match the regular expression ^[_a-z][a-z0-9_]*$.(8փ1
+Cpython:S125"Remove this commented out code.(ǀ8փ1
+rpython:S117"NRename this parameter "Gn" to match the regular expression ^[_a-z][a-z0-9_]*$.(8փ1
+Epython:S1481"%Remove the unused local variable "h".(ӣ8փ1
+>python:S125"Remove this commented out code.(8փ1
+rpython:S117"NRename this parameter "Gn" to match the regular expression ^[_a-z][a-z0-9_]*$.(8փ1
+Epython:S1481"%Remove the unused local variable "h".(8փ1
+ypython:S3776"TRefactor this function to reduce its Cognitive Complexity from 20 to the 15 allowed.(8փ1
+rpython:S117"NRename this parameter "Gn" to match the regular expression ^[_a-z][a-z0-9_]*$.(8փ1
+Epython:S1481"%Remove the unused local variable "h".(8փ1
+ypython:S3776"TRefactor this function to reduce its Cognitive Complexity from 21 to the 15 allowed.(8փ1
+rpython:S117"NRename this parameter "Gn" to match the regular expression ^[_a-z][a-z0-9_]*$.(8փ1
+Epython:S1481"%Remove the unused local variable "h".(8փ1
+qpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(Ԥ8փ1
+qpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(Ԥ8փ1
+Cpython:S125"Remove this commented out code.(巂8փ1
+qpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(Ԥ8փ1
+qpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(Ԥ8փ1
+rpython:S117"NRename this parameter "Gn" to match the regular expression ^[_a-z][a-z0-9_]*$.(8փ1
+Jpython:S1481"%Remove the unused local variable "h".(8փ1
+ypython:S3776"TRefactor this function to reduce its Cognitive Complexity from 60 to the 15 allowed.(8փ1
+<python:S2772"Remove this unneeded "pass".(۾8փ1
+rpython:S117"NRename this parameter "Gn" to match the regular expression ^[_a-z][a-z0-9_]*$.(Ѐ8փ1
+Jpython:S1481"%Remove the unused local variable "h".(8փ1
+ypython:S3776"TRefactor this function to reduce its Cognitive Complexity from 60 to the 15 allowed.(Ѐ8փ1
+<python:S2772"Remove this unneeded "pass".(۾8փ1
+opython:S1854"PRemove this assignment to local variable 'gram_matrix'; the value is never used.(8փ1
+rpython:S117"NRename this parameter "Gn" to match the regular expression ^[_a-z][a-z0-9_]*$.(܇8փ1
+Jpython:S1481"%Remove the unused local variable "h".(8փ1
+ypython:S3776"TRefactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.(܇8փ1
+<python:S2772"Remove this unneeded "pass".(۾8փ1
+mpython:S117"NRename this parameter "Gn" to match the regular expression ^[_a-z][a-z0-9_]*$.(8փ1
\ No newline at end of file
diff --git a/.idea/sonarlint/issuestore/4/b/4b702098a401fe45afea244c1caca0768741bdcc b/.idea/sonarlint/issuestore/4/b/4b702098a401fe45afea244c1caca0768741bdcc
index 47d8a4aa6b..f4cb71c67a 100644
--- a/.idea/sonarlint/issuestore/4/b/4b702098a401fe45afea244c1caca0768741bdcc
+++ b/.idea/sonarlint/issuestore/4/b/4b702098a401fe45afea244c1caca0768741bdcc
@@ -7,10 +7,11 @@ kpython:S117N"MRename this parameter "Y" to match the regular expression ^[_a
hpython:S5632s"IChange this code so that it raises an object deriving from BaseException.(܀80
qpython:S117"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(80
]python:S112">Replace this generic exception class with a more specific one.(ڿ80
->python:S125"Remove this commented out code.(80
-qpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(80
-zpython:S3776"URefactor this function to reduce its Cognitive Complexity from 167 to the 15 allowed.(80
-=python:S125"Remove this commented out code.(һH80
-rpython:S117"NRename this parameter "Gn" to match the regular expression ^[_a-z][a-z0-9_]*$.(80
-ypython:S3776"TRefactor this function to reduce its Cognitive Complexity from 21 to the 15 allowed.(80
-rpython:S117"NRename this parameter "Gn" to match the regular expression ^[_a-z][a-z0-9_]*$.(80
\ No newline at end of file
+>python:S125"Remove this commented out code.(80
+qpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(80
+zpython:S3776"URefactor this function to reduce its Cognitive Complexity from 167 to the 15 allowed.(80
+=python:S125"Remove this commented out code.(һH80
+Ypython:S1135"4Complete the task associated to this "TODO" comment.(81
+rpython:S117"NRename this parameter "Gn" to match the regular expression ^[_a-z][a-z0-9_]*$.(80
+ypython:S3776"TRefactor this function to reduce its Cognitive Complexity from 21 to the 15 allowed.(80
+rpython:S117"NRename this parameter "Gn" to match the regular expression ^[_a-z][a-z0-9_]*$.(80
\ No newline at end of file
diff --git a/.idea/sonarlint/issuestore/7/d/7d9fe5c4880676a514c3f87489c3d374ae526eb2 b/.idea/sonarlint/issuestore/7/d/7d9fe5c4880676a514c3f87489c3d374ae526eb2
index d1f417fdde..e69de29bb2 100644
--- a/.idea/sonarlint/issuestore/7/d/7d9fe5c4880676a514c3f87489c3d374ae526eb2
+++ b/.idea/sonarlint/issuestore/7/d/7d9fe5c4880676a514c3f87489c3d374ae526eb2
@@ -1,7 +0,0 @@
-
-npython:S1192J"QDefine a constant instead of duplicating this literal 'include/gedlib2/' 3 times.(
-cpython:S1192N"FDefine a constant instead of duplicating this literal 'Done!' 5 times.(
-Bpython:S1481h"%Remove the unused local variable "e".(
-4python:S2772Q"Remove this unneeded "pass".(۾
-7python:S125"Remove this commented out code.(
-<python:S125"Remove this commented out code.(
\ No newline at end of file
diff --git a/.idea/sonarlint/issuestore/8/b/8b6ea9e681978b8c715b1ee55ff74d4bc9ca07a0 b/.idea/sonarlint/issuestore/8/b/8b6ea9e681978b8c715b1ee55ff74d4bc9ca07a0
index ded7c757b8..b1f5db9a09 100644
--- a/.idea/sonarlint/issuestore/8/b/8b6ea9e681978b8c715b1ee55ff74d4bc9ca07a0
+++ b/.idea/sonarlint/issuestore/8/b/8b6ea9e681978b8c715b1ee55ff74d4bc9ca07a0
@@ -1,27 +1,27 @@
-wpython:S1192"RDefine a constant instead of duplicating this literal 'Computing kernels' 4 times.(81
-spython:S1192"NDefine a constant instead of duplicating this literal 'getting paths' 4 times.(81
-Bpython:S125I"Remove this commented out code.(뢠81
-ppython:S117Q"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(͉81
-ppython:S117Q"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(͉81
-python:S117`"`Rename this local variable "if_comp_X_paths" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
-hpython:S5632v"IChange this code so that it raises an object deriving from BaseException.(܀81
-qpython:S117"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
-mpython:S3776"TRefactor this function to reduce its Cognitive Complexity from 78 to the 15 allowed.(
-tpython:S1542"TRename function "traverseTrie1t" to match the regular expression ^[a-z_][a-z0-9_]*$.(81
-rpython:S1542"TRename function "traverseTrie2t" to match the regular expression ^[a-z_][a-z0-9_]*$.(Ƅ
-lpython:S1542"TRename function "traverseTrie1m" to match the regular expression ^[a-z_][a-z0-9_]*$.(r
-rpython:S1542"TRename function "traverseTrie2m" to match the regular expression ^[a-z_][a-z0-9_]*$.(ʸ
-]python:S112">Replace this generic exception class with a more specific one.(81
-]python:S112">Replace this generic exception class with a more specific one.(81
-jpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(܅
-jpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(˂
-qpython:S1542"SRename function "traverseGraph" to match the regular expression ^[a-z_][a-z0-9_]*$.(˂
-epython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(²
-Cpython:S1481"%Remove the unused local variable "l".(
-7python:S125"Remove this commented out code.(Ϸ
-jpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(
-rpython:S3776"TRefactor this function to reduce its Cognitive Complexity from 35 to the 15 allowed.(
-Fpython:S1481"(Remove the unused local variable "node".(ý
-<python:S125"Remove this commented out code.(
-fpython:S117"NRename this parameter "Gn" to match the regular expression ^[_a-z][a-z0-9_]*$.(
\ No newline at end of file
+wpython:S1192"RDefine a constant instead of duplicating this literal 'Computing kernels' 4 times.(81
+spython:S1192"NDefine a constant instead of duplicating this literal 'getting paths' 4 times.(81
+Bpython:S125I"Remove this commented out code.(뢠81
+ppython:S117Q"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(͉81
+ppython:S117Q"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(͉81
+python:S117`"`Rename this local variable "if_comp_X_paths" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
+hpython:S5632v"IChange this code so that it raises an object deriving from BaseException.(܀81
+qpython:S117"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
+tpython:S3776"TRefactor this function to reduce its Cognitive Complexity from 78 to the 15 allowed.(81
+tpython:S1542"TRename function "traverseTrie1t" to match the regular expression ^[a-z_][a-z0-9_]*$.(81
+ypython:S1542"TRename function "traverseTrie2t" to match the regular expression ^[a-z_][a-z0-9_]*$.(Ƅ81
+spython:S1542"TRename function "traverseTrie1m" to match the regular expression ^[a-z_][a-z0-9_]*$.(r81
+ypython:S1542"TRename function "traverseTrie2m" to match the regular expression ^[a-z_][a-z0-9_]*$.(ʸ81
+]python:S112">Replace this generic exception class with a more specific one.(81
+]python:S112">Replace this generic exception class with a more specific one.(81
+qpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(܅81
+qpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(˂81
+xpython:S1542"SRename function "traverseGraph" to match the regular expression ^[a-z_][a-z0-9_]*$.(˂81
+lpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(²81
+Jpython:S1481"%Remove the unused local variable "l".(81
+>python:S125"Remove this commented out code.(Ϸ81
+qpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
+ypython:S3776"TRefactor this function to reduce its Cognitive Complexity from 35 to the 15 allowed.(81
+Mpython:S1481"(Remove the unused local variable "node".(ý81
+Cpython:S125"Remove this commented out code.(81
+mpython:S117"NRename this parameter "Gn" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
\ No newline at end of file
diff --git a/.idea/sonarlint/issuestore/8/e/8e2edce0d507e1297474f25c00cae94258db38d8 b/.idea/sonarlint/issuestore/8/e/8e2edce0d507e1297474f25c00cae94258db38d8
index e69de29bb2..74fbc12b4b 100644
--- a/.idea/sonarlint/issuestore/8/e/8e2edce0d507e1297474f25c00cae94258db38d8
+++ b/.idea/sonarlint/issuestore/8/e/8e2edce0d507e1297474f25c00cae94258db38d8
@@ -0,0 +1,4 @@
+
+Ppython:S14819"1Replace unused local variable "unknown" with "_".(81
+=python:S125J"Remove this commented out code.(81
+=python:S125p"Remove this commented out code.(̯81
\ No newline at end of file
diff --git a/.idea/sonarlint/issuestore/9/d/9da51fb714decab48b6b0ed7c9e801c1dbafcc24 b/.idea/sonarlint/issuestore/9/d/9da51fb714decab48b6b0ed7c9e801c1dbafcc24
index c8e3241a04..66ea13d9b8 100644
--- a/.idea/sonarlint/issuestore/9/d/9da51fb714decab48b6b0ed7c9e801c1dbafcc24
+++ b/.idea/sonarlint/issuestore/9/d/9da51fb714decab48b6b0ed7c9e801c1dbafcc24
@@ -1,12 +1,12 @@
-jpython:S1192"QDefine a constant instead of duplicating this literal 'computer vision' 11 times.(
-opython:S1192"QDefine a constant instead of duplicating this literal 'social networks' 24 times.(
-`python:S1192"GDefine a constant instead of duplicating this literal '[2,23]' 4 times.(ҧ
-kpython:S1192H"NDefine a constant instead of duplicating this literal 'data/test.cxl' 5 times.(
-epython:S1192"GDefine a constant instead of duplicating this literal '[7,23]' 4 times.(
-lpython:S1192G"ODefine a constant instead of duplicating this literal 'data/train.cxl' 5 times.(̖
-epython:S1192"MDefine a constant instead of duplicating this literal 'testset_0.ds' 3 times.()
-lpython:S1192G"ODefine a constant instead of duplicating this literal 'data/valid.cxl' 5 times.(̖
-fpython:S1192"HDefine a constant instead of duplicating this literal '3D, RI' 13 times.(ն
-fpython:S1192"NDefine a constant instead of duplicating this literal 'trainset_0.ds' 3 times.()
-opython:S1192"RDefine a constant instead of duplicating this literal 'small molecules' 100 times.(ݺ
\ No newline at end of file
+qpython:S1192"QDefine a constant instead of duplicating this literal 'computer vision' 11 times.(81
+vpython:S1192"QDefine a constant instead of duplicating this literal 'social networks' 24 times.(81
+gpython:S1192"GDefine a constant instead of duplicating this literal '[2,23]' 4 times.(ҧ81
+rpython:S1192H"NDefine a constant instead of duplicating this literal 'data/test.cxl' 5 times.(81
+lpython:S1192"GDefine a constant instead of duplicating this literal '[7,23]' 4 times.(81
+spython:S1192G"ODefine a constant instead of duplicating this literal 'data/train.cxl' 5 times.(̖81
+lpython:S1192"MDefine a constant instead of duplicating this literal 'testset_0.ds' 3 times.()81
+spython:S1192G"ODefine a constant instead of duplicating this literal 'data/valid.cxl' 5 times.(̖81
+mpython:S1192"HDefine a constant instead of duplicating this literal '3D, RI' 13 times.(ն81
+mpython:S1192"NDefine a constant instead of duplicating this literal 'trainset_0.ds' 3 times.()81
+vpython:S1192"RDefine a constant instead of duplicating this literal 'small molecules' 100 times.(ݺ81
\ No newline at end of file
diff --git a/.idea/sonarlint/issuestore/d/6/d697b4ddaab34f76f9ad7e48d333dd3bf1387dac b/.idea/sonarlint/issuestore/d/6/d697b4ddaab34f76f9ad7e48d333dd3bf1387dac
index 9649601b1a..39f3aebf19 100644
--- a/.idea/sonarlint/issuestore/d/6/d697b4ddaab34f76f9ad7e48d333dd3bf1387dac
+++ b/.idea/sonarlint/issuestore/d/6/d697b4ddaab34f76f9ad7e48d333dd3bf1387dac
@@ -1,37 +1,35 @@
-vpython:S1192"VDefine a constant instead of duplicating this literal 'Cannot detect graphs.' 4 times.(8յ0
-python:S1192"dDefine a constant instead of duplicating this literal 'Parallel mode is not set correctly.' 3 times.(8յ0
-Bpython:S125"Remove this commented out code.(龼8յ0
-kpython:S117@"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(Ѡ8յ0
-Bpython:S125R"Remove this commented out code.(8յ0
-ppython:S117d"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(8յ0
-vpython:S117"WRename this local variable "X_diag" to match the regular expression ^[_a-z][a-z0-9_]*$.(ا8յ0
-vpython:S117"WRename this local variable "Y_diag" to match the regular expression ^[_a-z][a-z0-9_]*$.(ا8յ0
-xpython:S2737"XAdd logic to this except clause or eliminate it and rethrow the exception automatically.(8յ0
-lpython:S117"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(Ë8յ0
-xpython:S2737"XAdd logic to this except clause or eliminate it and rethrow the exception automatically.(8ֵ0
-~python:S1186"YAdd a nested comment explaining why this method is empty, or complete the implementation.(80
-ypython:S1186"YAdd a nested comment explaining why this method is empty, or complete the implementation.(80
-lpython:S117"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(Ҍ8ص0
-qpython:S117"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(ͫ8ص0
-vpython:S117"WRename this local variable "Y_copy" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ص0
->python:S125"Remove this commented out code.(8ص0
-lpython:S117"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(բ8ص0
-lpython:S117"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(բ8ص0
-qpython:S117"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ص0
-]python:S112">Replace this generic exception class with a more specific one.(ڿ8ص0
-ypython:S3776"TRefactor this function to reduce its Cognitive Complexity from 39 to the 15 allowed.(8ص0
-]python:S112">Replace this generic exception class with a more specific one.(ԛ8ص0
-]python:S112">Replace this generic exception class with a more specific one.(˿8ص0
-]python:S112">Replace this generic exception class with a more specific one.(ԛ8ص0
-]python:S112">Replace this generic exception class with a more specific one.(8ٵ0
-]python:S112">Replace this generic exception class with a more specific one.(ԛ8ٵ0
-]python:S112">Replace this generic exception class with a more specific one.(ۦ8ٵ0
-tpython:S930"UAdd 1 missing arguments; '_compute_gm_imap_unordered' expects 1 positional arguments.(8ٵ0
-bpython:S112">Replace this generic exception class with a more specific one.(ֵ8ٵ0
-xpython:S1186"YAdd a nested comment explaining why this method is empty, or complete the implementation.(28ٵ0
-xpython:S1186"YAdd a nested comment explaining why this method is empty, or complete the implementation.(͑8ٵ0
-bpython:S112">Replace this generic exception class with a more specific one.(ֵ8ٵ0
-~python:S1186"YAdd a nested comment explaining why this method is empty, or complete the implementation.(8ٵ0
-~python:S1186"YAdd a nested comment explaining why this method is empty, or complete the implementation.(8ڵ0
-ypython:S1186"YAdd a nested comment explaining why this method is empty, or complete the implementation.(ᘾ8ڵ0
\ No newline at end of file
+vpython:S1192"VDefine a constant instead of duplicating this literal 'Cannot detect graphs.' 4 times.(8Ɍ1
+python:S1192"dDefine a constant instead of duplicating this literal 'Parallel mode is not set correctly.' 3 times.(8Ɍ1
+Bpython:S125"Remove this commented out code.(龼8Ɍ1
+kpython:S117G"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(Ѡ8Ɍ1
+Bpython:S125Y"Remove this commented out code.(8Ɍ1
+ppython:S117k"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(8Ɍ1
+vpython:S117"WRename this local variable "X_diag" to match the regular expression ^[_a-z][a-z0-9_]*$.(ا8ʌ1
+vpython:S117"WRename this local variable "Y_diag" to match the regular expression ^[_a-z][a-z0-9_]*$.(ا8ʌ1
+xpython:S2737"XAdd logic to this except clause or eliminate it and rethrow the exception automatically.(8ʌ1
+lpython:S117"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(Ë8ʌ1
+xpython:S2737"XAdd logic to this except clause or eliminate it and rethrow the exception automatically.(8ʌ1
+Cpython:S125"Remove this commented out code.(8ʌ1
+ypython:S3776"TRefactor this function to reduce its Cognitive Complexity from 27 to the 15 allowed.(ɍ8ʌ1
+Tpython:S1135"4Complete the task associated to this "TODO" comment.(⾋8ʌ1
+ypython:S1186"YAdd a nested comment explaining why this method is empty, or complete the implementation.(8ʌ1
+lpython:S117"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(Ҍ8ʌ1
+qpython:S117"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(ͫ8ʌ1
+vpython:S117"WRename this local variable "Y_copy" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ʌ1
+>python:S125"Remove this commented out code.(8ʌ1
+lpython:S117"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(բ8ʌ1
+lpython:S117"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(բ8ʌ1
+qpython:S117"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ʌ1
+]python:S112">Replace this generic exception class with a more specific one.(ڿ8ʌ1
+ypython:S3776"TRefactor this function to reduce its Cognitive Complexity from 39 to the 15 allowed.(8ʌ1
+]python:S112">Replace this generic exception class with a more specific one.(ԛ8ʌ1
+]python:S112">Replace this generic exception class with a more specific one.(8ʌ1
+]python:S112">Replace this generic exception class with a more specific one.(ԛ8ʌ1
+]python:S112">Replace this generic exception class with a more specific one.(8ʌ1
+]python:S112">Replace this generic exception class with a more specific one.(ԛ8ʌ1
+]python:S112">Replace this generic exception class with a more specific one.(8ʌ1
+tpython:S930"UAdd 1 missing arguments; '_compute_gm_imap_unordered' expects 1 positional arguments.(8ʌ1
+Tpython:S1135"4Complete the task associated to this "TODO" comment.(Ҁ8捺1
+bpython:S112">Replace this generic exception class with a more specific one.(ֵ8ʌ1
+bpython:S112">Replace this generic exception class with a more specific one.(ֵ8ʌ1
\ No newline at end of file
diff --git a/.idea/sonarlint/issuestore/e/1/e1a5fc58928b159db47027eb44823443b1173d71 b/.idea/sonarlint/issuestore/e/1/e1a5fc58928b159db47027eb44823443b1173d71
index f70ca93dac..42f529950c 100644
--- a/.idea/sonarlint/issuestore/e/1/e1a5fc58928b159db47027eb44823443b1173d71
+++ b/.idea/sonarlint/issuestore/e/1/e1a5fc58928b159db47027eb44823443b1173d71
@@ -1,11 +1,11 @@
-wpython:S1192"RDefine a constant instead of duplicating this literal 'Computing kernels' 4 times.(8ȱ1
-rpython:S1192"RDefine a constant instead of duplicating this literal 'getting sp graphs' 4 times.(8ȱ1
-Bpython:S125B"Remove this commented out code.(뢠8ȱ1
-ppython:S117J"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(ٵ8ȱ1
-ppython:S117J"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(ٵ8ȱ1
-python:S117Y"dRename this local variable "if_comp_X_sp_graphs" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
-hpython:S5632p"IChange this code so that it raises an object deriving from BaseException.(܀8ȱ1
-qpython:S117"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ȱ1
-ypython:S3776"TRefactor this function to reduce its Cognitive Complexity from 44 to the 15 allowed.(8ȱ1
-tpython:S3776"TRefactor this function to reduce its Cognitive Complexity from 27 to the 15 allowed.(8ȱ1
\ No newline at end of file
+rpython:S1192"RDefine a constant instead of duplicating this literal 'getting sp graphs' 4 times.(81
+wpython:S1192"RDefine a constant instead of duplicating this literal 'Computing kernels' 4 times.(81
+Bpython:S125B"Remove this commented out code.(뢠81
+ppython:S117J"MRename this parameter "X" to match the regular expression ^[_a-z][a-z0-9_]*$.(ٵ81
+ppython:S117J"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(ٵ81
+python:S117Y"dRename this local variable "if_comp_X_sp_graphs" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
+hpython:S5632p"IChange this code so that it raises an object deriving from BaseException.(܀81
+qpython:S117"MRename this parameter "Y" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
+ypython:S3776"TRefactor this function to reduce its Cognitive Complexity from 44 to the 15 allowed.(81
+tpython:S3776"TRefactor this function to reduce its Cognitive Complexity from 27 to the 15 allowed.(81
\ No newline at end of file
diff --git a/.idea/sonarlint/issuestore/e/5/e5d3d9e106b9570776cc7c57e9e3b9b74590428b b/.idea/sonarlint/issuestore/e/5/e5d3d9e106b9570776cc7c57e9e3b9b74590428b
index b97132f66a..49524fa189 100644
--- a/.idea/sonarlint/issuestore/e/5/e5d3d9e106b9570776cc7c57e9e3b9b74590428b
+++ b/.idea/sonarlint/issuestore/e/5/e5d3d9e106b9570776cc7c57e9e3b9b74590428b
@@ -1,41 +1,42 @@
-lpython:S117
"NRename this parameter "G1" to match the regular expression ^[_a-z][a-z0-9_]*$.(80
-qpython:S1542
"RRename function "getSPLengths" to match the regular expression ^[a-z_][a-z0-9_]*$.(80
-Bpython:S125"Remove this commented out code.(ѐ80
-Bpython:S125"Remove this commented out code.(80
-ppython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(80
-kpython:S1170"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(80
-opython:S15420"PRename function "getSPGraph" to match the regular expression ^[a-z_][a-z0-9_]*$.(8ʹ1
-kpython:S117M"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(ۻ80
-|python:S117`"YRename this local variable "spMatrix" to match the regular expression ^[_a-z][a-z0-9_]*$.(͵80
-xpython:S1542M"YRename function "floydTransformation" to match the regular expression ^[a-z_][a-z0-9_]*$.(ۻ80
-ppython:S117k"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(É80
-lpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(֕80
-|python:S1542"\Rename function "untotterTransformation" to match the regular expression ^[a-z_][a-z0-9_]*$.(֕80
-=python:S125"Remove this commented out code.(=80
-mpython:S117"NRename this parameter "G1" to match the regular expression ^[_a-z][a-z0-9_]*$.(ٰ80
-mpython:S117"NRename this parameter "G2" to match the regular expression ^[_a-z][a-z0-9_]*$.(ٰ80
->python:S125"Remove this commented out code.(ԫЅ80
-mpython:S117"NRename this parameter "G1" to match the regular expression ^[_a-z][a-z0-9_]*$.(80
-mpython:S117"NRename this parameter "G2" to match the regular expression ^[_a-z][a-z0-9_]*$.(80
->python:S125"Remove this commented out code.(ԫЅ80
-lpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(ʒ80
-qpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(80
-tpython:S3776"TRefactor this function to reduce its Cognitive Complexity from 29 to the 15 allowed.(80
-tpython:S3776"TRefactor this function to reduce its Cognitive Complexity from 26 to the 15 allowed.(ά80
-]python:S112">Replace this generic exception class with a more specific one.(80
-Rpython:S1940"-Use the opposite operator ("is not") instead.(ջ80
-kpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(ړk80
-{python:S117"WRename this local variable "G_copy" to match the regular expression ^[_a-z][a-z0-9_]*$.(ٽ80
-rpython:S117"NRename this parameter "G1" to match the regular expression ^[_a-z][a-z0-9_]*$.(80
-rpython:S117"NRename this parameter "G2" to match the regular expression ^[_a-z][a-z0-9_]*$.(80
-|python:S1542"WRename function "graph_isIdentical" to match the regular expression ^[a-z_][a-z0-9_]*$.(80
-Npython:S1940")Use the opposite operator ("!=") instead.(lj80
-Ipython:S1940")Use the opposite operator ("!=") instead.(80
-mpython:S117"NRename this parameter "Gn" to match the regular expression ^[_a-z][a-z0-9_]*$.(80
-rpython:S117"NRename this parameter "Gn" to match the regular expression ^[_a-z][a-z0-9_]*$.(80
-qpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(80
-kpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(ܩ#80
-qpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(8ʹ1
-zpython:S117"VRename this local variable "G_new" to match the regular expression ^[_a-z][a-z0-9_]*$.(ͣ80
->python:S125"Remove this commented out code.(80
\ No newline at end of file
+lpython:S117
"NRename this parameter "G1" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
+qpython:S1542
"RRename function "getSPLengths" to match the regular expression ^[a-z_][a-z0-9_]*$.(81
+Bpython:S125"Remove this commented out code.(ѐ81
+Bpython:S125"Remove this commented out code.(81
+ppython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
+kpython:S1170"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
+opython:S15420"PRename function "getSPGraph" to match the regular expression ^[a-z_][a-z0-9_]*$.(81
+kpython:S117M"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(ۻ81
+|python:S117`"YRename this local variable "spMatrix" to match the regular expression ^[_a-z][a-z0-9_]*$.(͵81
+xpython:S1542M"YRename function "floydTransformation" to match the regular expression ^[a-z_][a-z0-9_]*$.(ۻ81
+ppython:S117k"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(É81
+lpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(֕81
+|python:S1542"\Rename function "untotterTransformation" to match the regular expression ^[a-z_][a-z0-9_]*$.(֕81
+=python:S125"Remove this commented out code.(=81
+mpython:S117"NRename this parameter "G1" to match the regular expression ^[_a-z][a-z0-9_]*$.(ٰ81
+mpython:S117"NRename this parameter "G2" to match the regular expression ^[_a-z][a-z0-9_]*$.(ٰ81
+>python:S125"Remove this commented out code.(ԫЅ81
+mpython:S117"NRename this parameter "G1" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
+mpython:S117"NRename this parameter "G2" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
+>python:S125"Remove this commented out code.(ԫЅ81
+lpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(ʒ81
+qpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
+tpython:S3776"TRefactor this function to reduce its Cognitive Complexity from 29 to the 15 allowed.(81
+tpython:S3776"TRefactor this function to reduce its Cognitive Complexity from 26 to the 15 allowed.(ά81
+]python:S112">Replace this generic exception class with a more specific one.(81
+Zpython:S1481"5Replace unused local variable "gram_matrix" with "_".(81
+Rpython:S1940"-Use the opposite operator ("is not") instead.(ջ81
+kpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(ړk81
+{python:S117"WRename this local variable "G_copy" to match the regular expression ^[_a-z][a-z0-9_]*$.(ٽ81
+rpython:S117"NRename this parameter "G1" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
+rpython:S117"NRename this parameter "G2" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
+|python:S1542"WRename function "graph_isIdentical" to match the regular expression ^[a-z_][a-z0-9_]*$.(81
+Npython:S1940")Use the opposite operator ("!=") instead.(lj81
+Ipython:S1940")Use the opposite operator ("!=") instead.(81
+mpython:S117"NRename this parameter "Gn" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
+rpython:S117"NRename this parameter "Gn" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
+qpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
+kpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(ܩ#81
+qpython:S117"MRename this parameter "G" to match the regular expression ^[_a-z][a-z0-9_]*$.(81
+zpython:S117"VRename this local variable "G_new" to match the regular expression ^[_a-z][a-z0-9_]*$.(ͣ81
+>python:S125"Remove this commented out code.(81
\ No newline at end of file
diff --git a/.idea/sonarlint/issuestore/index.pb b/.idea/sonarlint/issuestore/index.pb
index 0054ad9cd6..1f7e6fb790 100644
--- a/.idea/sonarlint/issuestore/index.pb
+++ b/.idea/sonarlint/issuestore/index.pb
@@ -173,8 +173,6 @@ Q
!gklearn/tests/ged/test_ged_env.py,b/9/b91493f829def88046c375e8f0935b15572991fe
_
/.github/workflows/github-actions-centos.yml_tmp,c/0/c0bf50efc6691bce894fd7cec1ce980b1060add1
-8
-setup.py,8/e/8e2edce0d507e1297474f25c00cae94258db38d8
T
$gklearn/kernels/weisfeiler_lehman.py,3/d/3d5d4f5096623dc263aad46858b9fba3a1540e2f
[
@@ -192,8 +190,6 @@ G
.gitignore,a/5/a5cc2925ca8258af241be7e5b0381edf30266302
N
gklearn/ged/median/__init__.py,f/a/fac8701a702a112a011622ee6c15915f7547ed6e
-N
-gklearn/ged/model/ged_model.py,0/a/0aa36dd3888601b15ef73b970692ae7db93a2f8f
]
-gklearn/preimage/median_preimage_generator.py,5/e/5ee12e961355ffaa84ff64fd56aeeb9e6c340199
I
@@ -204,8 +200,6 @@ G
,gklearn/ged/median/median_graph_estimator.py,3/2/3272070119d9a4e469a15a9baa4900ba00c811ec
N
gklearn/kernels/common_walk.py,6/8/68ab39f7a917945ead43148a14f94a1b5553036f
-P
- gklearn/tests/ged/test_gedlib.py,a/b/ab1c5a641494ae8b897a5644b5faeb58d19e322c
K
gklearn/tests/test_tools.py,b/9/b965a6d3033b59db2b540cd9810ebf4794980c09
c
@@ -218,37 +212,69 @@ g
7gklearn/experiments/thesis/ged/fit_distances/run_xps.py,0/3/03339f2b46e5c47d8077da61c590227fa92ea9dc
O
gklearn/dataset/data_fetcher.py,c/9/c98c7aa2f02e35eeaa0782f915b45bff88a78979
-R
-"gklearn/gedlib/src/GedLibBind2.hpp,e/7/e76b7fd6373d5e33c3be77b59a1f856a003beabe
-N
-gklearn/gedlib/setup_simple.py,7/d/7d9fe5c4880676a514c3f87489c3d374ae526eb2
-L
-gklearn/gedlib/gedlibpy2.pyx,4/1/4182be53956c3350b9e7e5582adc9cd7222e0b2a
L
gklearn/ged/util/__init__.py,4/d/4d52868f31993ec7a8205c746554bbad6694b15f
-Q
-!gklearn/gedlib/src/GedLibBind.hpp,4/d/4df2885441d3fd3625817c3a8a4e6b6ee196bd67
I
gklearn/ged/util/util2.py,0/9/097d78d12ec2f0ccb493c2cfce6add722ccd6c90
-K
-gklearn/gedlib/gedlibpy.pyx,1/7/179411feaa380d24c4035eb1222de86db56379d3
Q
!gklearn/gedlib/src/GedLibBind.ipp,8/a/8aac1109ccb068595a0b5174409afcd94f5937ff
-H
-gklearn/ged/util/util.py,2/3/23e24467d9801338cf98edc09aee81f19b0d2bfa
-R
-"gklearn/gedlib/src/GedLibBind2.ipp,9/6/96a64531c82cdd2aea0c56597656574f4cfb97fd
F
gklearn/utils/utils.py,e/5/e5d3d9e106b9570776cc7c57e9e3b9b74590428b
I
gklearn/utils/__init__.py,3/7/37f1f186e0c55fdbe30b5f27fd20344dd6ce63a7
J
gklearn/kernels/treelet.py,4/b/4b702098a401fe45afea244c1caca0768741bdcc
+L
+gklearn/gedlib/gedlibpy2.pyx,4/1/4182be53956c3350b9e7e5582adc9cd7222e0b2a
+R
+"gklearn/gedlib/src/GedLibBind2.hpp,e/7/e76b7fd6373d5e33c3be77b59a1f856a003beabe
+8
+setup.py,8/e/8e2edce0d507e1297474f25c00cae94258db38d8
+N
+gklearn/gedlib/setup_simple.py,7/d/7d9fe5c4880676a514c3f87489c3d374ae526eb2
+G
+gklearn/gedlib/setup.py,1/b/1bc572d82978a86cb8f7f57cc196861aeac4d636
+K
+gklearn/dataset/metadata.py,9/d/9da51fb714decab48b6b0ed7c9e801c1dbafcc24
O
gklearn/kernels/path_up_to_h.py,8/b/8b6ea9e681978b8c715b1ee55ff74d4bc9ca07a0
+K
+gklearn/gedlib/gedlibpy.pyx,1/7/179411feaa380d24c4035eb1222de86db56379d3
P
gklearn/kernels/shortest_path.py,e/1/e1a5fc58928b159db47027eb44823443b1173d71
-K
-gklearn/dataset/metadata.py,9/d/9da51fb714decab48b6b0ed7c9e801c1dbafcc24
+R
+"gklearn/gedlib/src/GedLibBind2.ipp,9/6/96a64531c82cdd2aea0c56597656574f4cfb97fd
P
- gklearn/kernels/structural_sp.py,1/d/1d5a8bee7114cbb604f132a1c5834c6ba0031053
\ No newline at end of file
+ gklearn/kernels/structural_sp.py,1/d/1d5a8bee7114cbb604f132a1c5834c6ba0031053
+Q
+!gklearn/gedlib/src/GedLibBind.hpp,4/d/4df2885441d3fd3625817c3a8a4e6b6ee196bd67
+H
+gklearn/ged/util/util.py,2/3/23e24467d9801338cf98edc09aee81f19b0d2bfa
+N
+gklearn/ged/model/ged_model.py,0/a/0aa36dd3888601b15ef73b970692ae7db93a2f8f
+P
+ gklearn/tests/ged/test_gedlib.py,a/b/ab1c5a641494ae8b897a5644b5faeb58d19e322c
+@
+.readthedocs.yml,8/1/81ccd5c4e1f93eb3ab80c73b5532455bf4f82fe9
+C
+docs/source/conf.py,a/d/aded7756cdea7c289134466a0d54da4f26d43abb
+E
+docs/requirements.txt,2/7/271b54d579b58b0097c7c56b8ab060c6e3a67b4f
+S
+#gklearn/tests/test_graph_kernels.py,1/f/1fcfed8fc62ee1400a5f1866aa8afc2ff52b5251
+W
+'notebooks/run_weisfeilerlehmankernel.py,a/0/a051a142cf91b805317358b39698a25161a7593b
+A
+notebooks/libs.py,9/2/928808836c6c8b3bff2a62b7a3ecbb7d8e15a1d2
+`
+0gklearn/utils/model_selection_precomputed_new.py,9/6/96438986b4045b41cb38fa0be2dec2b9f9216808
+z
+Jgklearn/experiments/kernels/kernel_models_implementations/run_wlsubtree.py,b/5/b54a0189996f05a2176c417f4571a8614e2adc7c
+K
+gklearn/utils/graphfiles.py,8/c/8c4942bdae9498cac8a3d3664ecb3910c73c90b1
+`
+0gklearn/examples/kernels/compute_graph_kernel.py,8/b/8b3270e1aef88eb60acb560e736bebf658df6285
+@
+requirements.txt,1/9/19359a61ae2446b51b549167b014da2fcf265768
+E
+requirements_pypi.txt,d/4/d4da63a4ba5902ba5cbe50e97ea70a55b8248b12
\ No newline at end of file
diff --git a/.idea/sonarlint/securityhotspotstore/index.pb b/.idea/sonarlint/securityhotspotstore/index.pb
index 8c9b8d2e48..478cbdeb43 100644
--- a/.idea/sonarlint/securityhotspotstore/index.pb
+++ b/.idea/sonarlint/securityhotspotstore/index.pb
@@ -173,8 +173,6 @@ Q
!gklearn/tests/ged/test_ged_env.py,b/9/b91493f829def88046c375e8f0935b15572991fe
_
/.github/workflows/github-actions-centos.yml_tmp,c/0/c0bf50efc6691bce894fd7cec1ce980b1060add1
-8
-setup.py,8/e/8e2edce0d507e1297474f25c00cae94258db38d8
T
$gklearn/kernels/weisfeiler_lehman.py,3/d/3d5d4f5096623dc263aad46858b9fba3a1540e2f
[
@@ -192,16 +190,12 @@ G
.gitignore,a/5/a5cc2925ca8258af241be7e5b0381edf30266302
N
gklearn/ged/median/__init__.py,f/a/fac8701a702a112a011622ee6c15915f7547ed6e
-N
-gklearn/ged/model/ged_model.py,0/a/0aa36dd3888601b15ef73b970692ae7db93a2f8f
]
-gklearn/preimage/median_preimage_generator.py,5/e/5ee12e961355ffaa84ff64fd56aeeb9e6c340199
I
gklearn/utils/parallel.py,a/6/a63d3c10e4d41e439c38faa30846ad3818d0bfed
G
gklearn/utils/median.py,1/a/1a8ec9d493901bf83489f0400a4b91aba5e9af1a
-P
- gklearn/tests/ged/test_gedlib.py,a/b/ab1c5a641494ae8b897a5644b5faeb58d19e322c
\
,gklearn/ged/median/median_graph_estimator.py,3/2/3272070119d9a4e469a15a9baa4900ba00c811ec
N
@@ -218,37 +212,69 @@ g
7gklearn/experiments/thesis/ged/fit_distances/run_xps.py,0/3/03339f2b46e5c47d8077da61c590227fa92ea9dc
O
gklearn/dataset/data_fetcher.py,c/9/c98c7aa2f02e35eeaa0782f915b45bff88a78979
-R
-"gklearn/gedlib/src/GedLibBind2.hpp,e/7/e76b7fd6373d5e33c3be77b59a1f856a003beabe
-N
-gklearn/gedlib/setup_simple.py,7/d/7d9fe5c4880676a514c3f87489c3d374ae526eb2
-R
-"gklearn/gedlib/src/GedLibBind2.ipp,9/6/96a64531c82cdd2aea0c56597656574f4cfb97fd
-L
-gklearn/gedlib/gedlibpy2.pyx,4/1/4182be53956c3350b9e7e5582adc9cd7222e0b2a
L
gklearn/ged/util/__init__.py,4/d/4d52868f31993ec7a8205c746554bbad6694b15f
-Q
-!gklearn/gedlib/src/GedLibBind.hpp,4/d/4df2885441d3fd3625817c3a8a4e6b6ee196bd67
I
gklearn/ged/util/util2.py,0/9/097d78d12ec2f0ccb493c2cfce6add722ccd6c90
-K
-gklearn/gedlib/gedlibpy.pyx,1/7/179411feaa380d24c4035eb1222de86db56379d3
Q
!gklearn/gedlib/src/GedLibBind.ipp,8/a/8aac1109ccb068595a0b5174409afcd94f5937ff
-H
-gklearn/ged/util/util.py,2/3/23e24467d9801338cf98edc09aee81f19b0d2bfa
F
gklearn/utils/utils.py,e/5/e5d3d9e106b9570776cc7c57e9e3b9b74590428b
I
gklearn/utils/__init__.py,3/7/37f1f186e0c55fdbe30b5f27fd20344dd6ce63a7
-P
- gklearn/kernels/shortest_path.py,e/1/e1a5fc58928b159db47027eb44823443b1173d71
-K
-gklearn/dataset/metadata.py,9/d/9da51fb714decab48b6b0ed7c9e801c1dbafcc24
J
gklearn/kernels/treelet.py,4/b/4b702098a401fe45afea244c1caca0768741bdcc
+N
+gklearn/gedlib/setup_simple.py,7/d/7d9fe5c4880676a514c3f87489c3d374ae526eb2
+L
+gklearn/gedlib/gedlibpy2.pyx,4/1/4182be53956c3350b9e7e5582adc9cd7222e0b2a
+R
+"gklearn/gedlib/src/GedLibBind2.hpp,e/7/e76b7fd6373d5e33c3be77b59a1f856a003beabe
+8
+setup.py,8/e/8e2edce0d507e1297474f25c00cae94258db38d8
+G
+gklearn/gedlib/setup.py,1/b/1bc572d82978a86cb8f7f57cc196861aeac4d636
+K
+gklearn/dataset/metadata.py,9/d/9da51fb714decab48b6b0ed7c9e801c1dbafcc24
O
gklearn/kernels/path_up_to_h.py,8/b/8b6ea9e681978b8c715b1ee55ff74d4bc9ca07a0
+K
+gklearn/gedlib/gedlibpy.pyx,1/7/179411feaa380d24c4035eb1222de86db56379d3
+Q
+!gklearn/gedlib/src/GedLibBind.hpp,4/d/4df2885441d3fd3625817c3a8a4e6b6ee196bd67
P
- gklearn/kernels/structural_sp.py,1/d/1d5a8bee7114cbb604f132a1c5834c6ba0031053
\ No newline at end of file
+ gklearn/kernels/shortest_path.py,e/1/e1a5fc58928b159db47027eb44823443b1173d71
+R
+"gklearn/gedlib/src/GedLibBind2.ipp,9/6/96a64531c82cdd2aea0c56597656574f4cfb97fd
+P
+ gklearn/kernels/structural_sp.py,1/d/1d5a8bee7114cbb604f132a1c5834c6ba0031053
+P
+ gklearn/tests/ged/test_gedlib.py,a/b/ab1c5a641494ae8b897a5644b5faeb58d19e322c
+N
+gklearn/ged/model/ged_model.py,0/a/0aa36dd3888601b15ef73b970692ae7db93a2f8f
+H
+gklearn/ged/util/util.py,2/3/23e24467d9801338cf98edc09aee81f19b0d2bfa
+@
+.readthedocs.yml,8/1/81ccd5c4e1f93eb3ab80c73b5532455bf4f82fe9
+C
+docs/source/conf.py,a/d/aded7756cdea7c289134466a0d54da4f26d43abb
+E
+docs/requirements.txt,2/7/271b54d579b58b0097c7c56b8ab060c6e3a67b4f
+S
+#gklearn/tests/test_graph_kernels.py,1/f/1fcfed8fc62ee1400a5f1866aa8afc2ff52b5251
+W
+'notebooks/run_weisfeilerlehmankernel.py,a/0/a051a142cf91b805317358b39698a25161a7593b
+A
+notebooks/libs.py,9/2/928808836c6c8b3bff2a62b7a3ecbb7d8e15a1d2
+`
+0gklearn/utils/model_selection_precomputed_new.py,9/6/96438986b4045b41cb38fa0be2dec2b9f9216808
+z
+Jgklearn/experiments/kernels/kernel_models_implementations/run_wlsubtree.py,b/5/b54a0189996f05a2176c417f4571a8614e2adc7c
+K
+gklearn/utils/graphfiles.py,8/c/8c4942bdae9498cac8a3d3664ecb3910c73c90b1
+`
+0gklearn/examples/kernels/compute_graph_kernel.py,8/b/8b3270e1aef88eb60acb560e736bebf658df6285
+@
+requirements.txt,1/9/19359a61ae2446b51b549167b014da2fcf265768
+E
+requirements_pypi.txt,d/4/d4da63a4ba5902ba5cbe50e97ea70a55b8248b12
\ No newline at end of file
diff --git a/README.md b/README.md
index bdc9ce416f..5b6a0599ba 100644
--- a/README.md
+++ b/README.md
@@ -21,6 +21,7 @@ A Python package for graph kernels, graph edit distances and graph pre-image pro
* tqdm>=4.26.0
* control>=0.8.2 (for generalized random walk kernels only)
* slycot>=0.3.3 (for generalized random walk kernels only, which requires a fortran compiler (e.g., `gfortran`) and BLAS/LAPACK (e.g. `liblapack-dev`))
+* Cython~=0.29.33 (for GEDLIB only)
## How to use?
diff --git a/gklearn/ged/model/ged_model.py b/gklearn/ged/model/ged_model.py
index eb3f6afc8b..ea6793f04c 100644
--- a/gklearn/ged/model/ged_model.py
+++ b/gklearn/ged/model/ged_model.py
@@ -200,7 +200,13 @@ def transform(
return dis_matrix
- def fit_transform(self, X, y=None, save_dm_train=False, **kwargs):
+ def fit_transform(
+ self,
+ X,
+ y=None,
+ save_dm_train=False,
+ save_mm_train: bool = False,
+ **kwargs):
"""Fit and transform: compute GED distance matrix on the same data.
Parameters
@@ -230,7 +236,7 @@ def fit_transform(self, X, y=None, save_dm_train=False, **kwargs):
# finally:
# np.seterr(**old_settings)
- if save_dm_train:
+ if save_mm_train or save_dm_train:
self._dm_train = dis_matrix
# If the model is refitted and the `save_dm_train` flag is not set, then
# remove the previously computed dm_train to prevent conflicts.
@@ -270,6 +276,10 @@ def validate_parameters(self):
None.
"""
+ if self.parallel == False:
+ self.parallel = None
+ elif self.parallel == True:
+ self.parallel = 'imap_unordered'
if self.parallel is not None and self.parallel != 'imap_unordered':
raise ValueError('Parallel mode is not set correctly.')
@@ -316,25 +326,27 @@ def compute_distance_matrix(self, Y=None, **kwargs):
Parameters
----------
Y : list of graphs, optional
- The target graphs. The default is None. If None kernel is computed
+ The target graphs. The default is None. If None distance is computed
between X and itself.
Returns
-------
- kernel_matrix : numpy array, shape = [n_targets, n_inputs]
- The computed kernel matrix.
+ dis_matrix : numpy array, shape = [n_targets, n_inputs]
+ The computed distance matrix.
"""
if Y is None:
- # Compute Gram matrix for self._graphs (X).
+ # Compute metric matrix for self._graphs (X).
dis_matrix = self._compute_X_distance_matrix(**kwargs)
# self._gram_matrix_unnorm = np.copy(self._gram_matrix)
else:
- # Compute kernel matrix between Y and self._graphs (X).
+ # Compute metric matrix between Y and self._graphs (X).
Y_copy = ([g.copy() for g in Y] if self.copy_graphs else Y)
- graphs_copy = ([g.copy() for g in
- self._graphs] if self.copy_graphs else self._graphs)
+ graphs_copy = (
+ [g.copy() for g in self._graphs]
+ if self.copy_graphs else self._graphs
+ )
start_time = time.time()
@@ -786,8 +798,8 @@ def is_graph(self, graph):
if isinstance(graph, nx.MultiDiGraph):
return True
return False
-
-
+
+
def __repr__(self):
return (
f"{self.__class__.__name__}("
@@ -833,20 +845,31 @@ def graphs(self):
def run_time(self):
return self._run_time
+
@property
def test_run_time(self):
return self._test_run_time
+
@property
def dis_matrix(self):
return self._dm_train
-
@dis_matrix.setter
def dis_matrix(self, value):
self._dm_train = value
+ @property
+ def metric_matrix(self):
+ return self._dm_train
+
+
+ @metric_matrix.setter
+ def metric_matrix(self, value):
+ self._dm_train = value
+
+
@property
def edit_cost_constants(self):
return self._edit_cost_constants
@@ -860,6 +883,17 @@ def edit_cost_constants(self):
# def gram_matrix_unnorm(self, value):
# self._gram_matrix_unnorm = value
+ @property
+ def n_pairs(self):
+ """
+ The number of pairs of graphs between which the GEDs are computed.
+ """
+ try:
+ check_is_fitted(self, '_dm_train')
+ return len(self._dm_train) * (len(self._dm_train) - 1) / 2
+ except NotFittedError:
+ return None
+
def _init_worker_ged_mat(gn_toshare):
global G_gn
diff --git a/gklearn/kernels/graph_kernel.py b/gklearn/kernels/graph_kernel.py
index 7992396942..3a9ae9fa1f 100644
--- a/gklearn/kernels/graph_kernel.py
+++ b/gklearn/kernels/graph_kernel.py
@@ -154,7 +154,12 @@ def transform(self, X=None, load_gm_train=False):
return kernel_matrix
- def fit_transform(self, X, save_gm_train=False):
+ def fit_transform(
+ self,
+ X,
+ save_gm_train: bool = False,
+ save_mm_train: bool = False,
+ ):
"""Fit and transform: compute Gram matrix on the same data.
Parameters
@@ -187,7 +192,7 @@ def fit_transform(self, X, save_gm_train=False):
finally:
np.seterr(**old_settings)
- if save_gm_train:
+ if save_mm_train or save_gm_train:
self._gm_train = gram_matrix
return gram_matrix
@@ -783,6 +788,16 @@ def gram_matrix(self, value):
self._gm_train = value
+ @property
+ def metric_matrix(self):
+ return self._gm_train
+
+
+ @metric_matrix.setter
+ def metric_matrix(self, value):
+ self._gm_train = value
+
+
@property
def gram_matrix_unnorm(self):
return self._gram_matrix_unnorm
@@ -791,3 +806,15 @@ def gram_matrix_unnorm(self):
@gram_matrix_unnorm.setter
def gram_matrix_unnorm(self, value):
self._gram_matrix_unnorm = value
+
+
+ @property
+ def n_pairs(self):
+ """
+ The number of pairs of graphs between which the kernels are computed.
+ """
+ try:
+ check_is_fitted(self, '_gm_train')
+ return len(self._gm_train) * (len(self._gm_train) + 1) / 2
+ except NotFittedError:
+ return None
diff --git a/gklearn/kernels/treelet.py b/gklearn/kernels/treelet.py
index ddd51bfa9f..b17eaeee86 100644
--- a/gklearn/kernels/treelet.py
+++ b/gklearn/kernels/treelet.py
@@ -456,8 +456,8 @@ def _kernel_do(self, canonkey1, canonkey2):
if len(keys) == 0: # There is nothing in common...
return 0
- vector1 = np.array([canonkey1.get(key,0) for key in keys])
- vector2 = np.array([canonkey2.get(key,0)for key in keys])
+ vector1 = np.array([canonkey1.get(key, 0) for key in keys])
+ vector2 = np.array([canonkey2.get(key, 0) for key in keys])
# vector1, vector2 = [], []
# keys1, keys2 = canonkey1, canonkey2
diff --git a/gklearn/tests/test_graph_kernels.py b/gklearn/tests/test_graph_kernels.py
index 08091cb80b..8c3e86e7ad 100644
--- a/gklearn/tests/test_graph_kernels.py
+++ b/gklearn/tests/test_graph_kernels.py
@@ -102,6 +102,18 @@ def assert_equality(compute_fun, **kwargs):
assert np.array_equal(lst[i], lst[i + 1])
+def assert_semidefinite(gram_matrix):
+ """Check if a matrix is positive semi-definite.
+ """
+ eigvals = np.linalg.eigvals(gram_matrix)
+ assert np.all(
+ eigvals >= -1e-9
+ ), "Gram matrix is not positive semi-definite."
+
+
+##############################################################################
+
+
@pytest.mark.parametrize('ds_name', ['Alkane_unlabeled', 'AIDS'])
@pytest.mark.parametrize('weight,compute_method', [(0.01, 'geo'), (1, 'exp')])
# @pytest.mark.parametrize('parallel', ['imap_unordered', None])
@@ -143,6 +155,8 @@ def compute(parallel=None):
verbose=True
)
+ assert_semidefinite(gram_matrix)
+
except Exception as exception:
print(repr(exception))
assert False, exception
@@ -198,6 +212,8 @@ def compute(parallel=None):
verbose=True
)
+ assert_semidefinite(gram_matrix)
+
except Exception as exception:
print(repr(exception))
assert False, exception
@@ -249,6 +265,8 @@ def compute(parallel=None):
verbose=True
)
+ assert_semidefinite(gram_matrix)
+
except Exception as exception:
print(repr(exception))
assert False, exception
@@ -319,6 +337,8 @@ def compute(parallel=None):
verbose=True
)
+ assert_semidefinite(gram_matrix)
+
except Exception as exception:
print(repr(exception))
assert False, exception
@@ -388,6 +408,8 @@ def compute(parallel=None):
verbose=True
)
+ assert_semidefinite(gram_matrix)
+
except Exception as exception:
print(repr(exception))
assert False, exception
@@ -441,6 +463,8 @@ def compute(parallel=None):
verbose=True
)
+ assert_semidefinite(gram_matrix)
+
except Exception as exception:
print(repr(exception))
assert False, exception
@@ -558,6 +582,8 @@ def compute(parallel=None, fcsp=None):
verbose=True
)
+ assert_semidefinite(gram_matrix)
+
except Exception as exception:
print(repr(exception))
assert False, exception
@@ -633,6 +659,8 @@ def compute(parallel=None, fcsp=None):
verbose=True
)
+ assert_semidefinite(gram_matrix)
+
except Exception as exception:
print(repr(exception))
assert False, exception
@@ -691,6 +719,8 @@ def compute(parallel=None, compute_method=None):
verbose=True
)
+ assert_semidefinite(gram_matrix)
+
except Exception as exception:
print(repr(exception))
assert False, exception
@@ -742,6 +772,8 @@ def compute(parallel=None):
verbose=True
)
+ assert_semidefinite(gram_matrix)
+
except Exception as exception:
print(repr(exception))
assert False, exception
@@ -798,6 +830,8 @@ def compute(parallel=None):
verbose=True
)
+ assert_semidefinite(gram_matrix)
+
except Exception as exception:
print(repr(exception))
assert False, exception
@@ -806,7 +840,9 @@ def compute(parallel=None):
# assert_equality(compute, parallel=[None, 'imap_unordered'])
- assert_equality(compute, parallel=[None]) # @TODO: parallel returns different results.
+ assert_equality(
+ compute, parallel=[None]
+ ) # @TODO: parallel returns different results.
if __name__ == "__main__":
@@ -822,10 +858,10 @@ def compute(parallel=None):
# test_RandomWalk('Acyclic', 'fp', None, None)
# test_RandomWalk('Acyclic', 'spectral', 'exp', 'imap_unordered')
# test_CommonWalk('Acyclic', 0.01, 'geo')
- test_CommonWalk('Alkane_unlabeled', 0.01, 'geo')
-# test_Marginalized('Acyclic', False)
-# test_ShortestPath('Acyclic')
-# test_PathUpToH('Acyclic', 'MinMax')
+ # test_CommonWalk('Alkane_unlabeled', 0.01, 'geo')
+ # test_Marginalized('Acyclic', False)
+ # test_ShortestPath('Acyclic')
+ test_PathUpToH('Alkane_unlabeled', 'tanimoto')
# test_Treelet('AIDS')
# test_SylvesterEquation('Acyclic')
# test_ConjugateGradient('Acyclic')
diff --git a/requirements.txt b/requirements.txt
index da822f7c18..d9050182c1 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -7,6 +7,7 @@ tabulate>=0.8.2
tqdm>=4.26.0
control>=0.8.2 # for generalized random walk kernels only.
slycot>=0.3.3 # for generalized random walk kernels only, which requires a fortran compiler (e.g., `gfortran`) and BLAS/LAPACK (e.g. `liblapack-dev`)
+Cython~=0.29.33 # for GEDLIB.
cvxpy>=1.0.31 # for preimage. Does not work for "pip install graphkit-learn".
# -e https://files.pythonhosted.org/packages/11/d0/d900870dc2d02ea74961b90c353666c6528a33ea61a10aa59a0d5574ae59/cvxpy-1.0.31.tar.gz # for preimage.
cvxopt>=1.2.5 # for preimage.
diff --git a/requirements_pypi.txt b/requirements_pypi.txt
index d1718a0578..db791394a3 100644
--- a/requirements_pypi.txt
+++ b/requirements_pypi.txt
@@ -7,6 +7,7 @@ tabulate>=0.8.2
tqdm>=4.26.0
control>=0.8.2 # for generalized random walk kernels only.
# slycot>=0.3.3 # for generalized random walk kernels only, which requires a fortran compiler (e.g., `gfortran`) and BLAS/LAPACK (e.g. `liblapack-dev`)
+Cython~=0.29.33 # for GEDLIB.
# cvxpy>=1.0.31 # for preimage. Does not work for "pip install graphkit-learn".
# -e https://files.pythonhosted.org/packages/11/d0/d900870dc2d02ea74961b90c353666c6528a33ea61a10aa59a0d5574ae59/cvxpy-1.0.31.tar.gz # for preimage.
cvxopt>=1.2.5 # for preimage.
diff --git a/setup.py b/setup.py
index dbc40a91f5..cae57290ce 100644
--- a/setup.py
+++ b/setup.py
@@ -60,23 +60,52 @@ def parse_args():
args = parse_args()
-if args.build_gedlibpy == 'true':
- # Compile GEDLIBPY module:
- import subprocess
-
- cur_python = sys.executable
- subprocess.call([cur_python, '--version'])
- subprocess.call(['which', cur_python])
- gedlib_dir = 'gklearn/gedlib/'
- subprocess.call(
- [
- cur_python, 'setup.py',
- # '--use-existing-gedlib', args.use_existing_gedlib,
- # '--build-gedlib', args.build_gedlib,
- # '--develop-mode', args.develop_mode,
- 'build_ext', '--inplace'
- ], cwd=gedlib_dir
- )
+from setuptools.command.install import install
+
+
+class CustomInstallCommand(install):
+ """Customized setuptools install command - prints a friendly greeting."""
+
+
+ def run(self):
+ if args.build_gedlibpy == 'true':
+ # Compile GEDLIBPY module:
+ import subprocess
+
+ cur_python = sys.executable
+ subprocess.call([cur_python, '--version'])
+ subprocess.call(['which', cur_python])
+ gedlib_dir = 'gklearn/gedlib/'
+ subprocess.call(
+ [
+ cur_python, 'setup_simple.py', # 'setup.py',
+ # '--use-existing-gedlib', args.use_existing_gedlib,
+ # '--build-gedlib', args.build_gedlib,
+ # '--develop-mode', args.develop_mode,
+ 'build_ext', '--inplace'
+ ], cwd=gedlib_dir
+ )
+
+ install.run(self)
+
+
+# if args.build_gedlibpy == 'true':
+# # Compile GEDLIBPY module:
+# import subprocess
+#
+# cur_python = sys.executable
+# subprocess.call([cur_python, '--version'])
+# subprocess.call(['which', cur_python])
+# gedlib_dir = 'gklearn/gedlib/'
+# subprocess.call(
+# [
+# cur_python, 'setup_simple.py', # 'setup.py',
+# # '--use-existing-gedlib', args.use_existing_gedlib,
+# # '--build-gedlib', args.build_gedlib,
+# # '--develop-mode', args.develop_mode,
+# 'build_ext', '--inplace'
+# ], cwd=gedlib_dir
+# )
# Install graphkit-learn:
with open("README.md", "r") as fh:
@@ -90,8 +119,8 @@ def parse_args():
name="graphkit-learn",
version=version,
author="Linlin Jia",
- author_email="linlin.jia@unibe.ch",
- description="A Python library for graph kernels, graph edit distances, and graph pre-images",
+ author_email="jajupmochi@gmail.com",
+ description="A Python library for machine learning on graphs.",
long_description=long_description,
long_description_content_type="text/markdown",
project_urls={
@@ -109,4 +138,12 @@ def parse_args():
'Intended Audience :: Developers',
],
install_requires=install_requires,
+ cmdclass={
+ 'install': CustomInstallCommand,
+ },
+ # package_dir={'': 'gklearn'},
+ # package_data={
+ # # '': ['README.md', 'requirements_pypi.txt', 'requirements.txt', 'LICENSE'],
+ # 'gedlib': ['README.rst', 'gedlibpy.pyx', '*.hpp', '*.ipp'],
+ # },
)