Network Analysis - Node degree filter

Hi,

I’m trying to do a network analysis. I have four different types of nodes linked as you can see in the picture and in the attached workflow:

Person (P00x);

Incident (I00x);

Doctor (D00x);

N° Plate (N00x).

 

Without considering the “Doctor” type nodes, I’d like to consider only the nodes “Person” with a degree greater than 2 (id est Person with at least 2 Incidents). In our example after excluding “Doctor” type nodes, the degree of “Person” nodes should be always 1, so we shouldn’t have Person nodes with degree greater than 2 ( because we don’t have Person with at least 2 Incidents and we have already excluded the Doctor nodes). 

In order to avoid considering the Doctor type nodes, I created a partition for each class (Person, Incident, Doctor, N°Plate) and I filtered out the category “Doctor” through the nodes "Partition Filter". But then, when I filter the remaining nodes with the “filter node degree” with a degree greater than 2, Knime continues to consider the Person nodes as if they were linked with the “Doctor” nodes previously excluded with the Partition Filter (I get the same result using the node Object ID Filter). So Knime considers “Person” nodes with a degree of 2 (as if they were linked to the Doctor nodes) and not with a degree 1 .

How can I configure Knime in order to consider the “Person” nodes with a degree of 1 (excluding the Doctor nodes type)?

Thank you in advance!

Hi,

this is because KNIME treats edges with only one node as loops. Once you have filtered the doctor node the two person nodes will still have two edges one edge connecting the person to the incident an one edge connecting to the node itself (loop). This is due to the fact that KNIME can handle hypergraphs and how it represents graphs internaly. So after filtering nodes you always need to filter possible loops e.g. by using the Edge Degree Filter node with a minimum degree of 2.

I have updated your workflow accordingly and added some annotations to it. I have also added a little meta node to show you how to get a very similar visualization using the Network Viewer node.

Bye,

Tobias

Ok, it works! Thank you very much Tobias!