-
Notifications
You must be signed in to change notification settings - Fork 3
Network similarity
Measures the similarity between two or more networks.
This algorithm measures the similarity between different networks. This comparison is conceived not only in terms of similarity of the nodes, but also from a functional point of view, watching their structures and the flow of information by a semantic perspective, using the same approach followed by the Ranked influence typology algorithm.
Given some distributions of influences measured using Ranked Influence Typology algorithm, and the number of connections, it provides two different misures of similarity: a quantitative one, along with another more qualitative.
Finding how similar are personal profiles of users, similarities between maps of interactions or how strong are the similitudes in patterns of data, are only examples.
watchcomplexity.network.similarity(
subject=Object,
networks=Array[Object]
)
Field | Type | Required | Description |
---|---|---|---|
subject |
Object | yes | An object representing the distribution of the roles of the nodes (pre-calculated by the Ranked influence typology algorithm) that must be compared to the list of networks. |
networks |
[Object] | yes | The list of every single network with its corresponding role typology distribution (pre-calculated by the Ranked influence typology algorithm) to which the above network subject must be compared. |
Both subject
, and every role distribution inside networks
, in addition to the role fields, must contains also the field edges
(meaning it as the number of connections of the network).
// The subject (network role distribution, to which other networks will be compared)
const subject = {
edges: 100,
Blackhole: 0,
Vulcano: 0,
Channeler: 0,
Chain: 0,
Bridge: 1,
Connector: 3,
'Emitter branch': 15,
'Receiver branch': 2,
Receiver: 2,
Emitter: 4,
'Low emitter': 9,
Idle: 0,
Transceiver: 5,
Tophub: 0,
Hub: 1,
Dam: 6,
Reducer: 12,
Megamplifier: 7,
Amplifier: 10
};
// Networks (the list of role distributions, that will be compared to the subject network)
const networks = [
{...},
{
edges: 100,
Blackhole: 0,
Vulcano: 0,
Channeler: 0,
Chain: 0,
Bridge: 1,
Connector: 3,
'Emitter branch': 16,
'Receiver branch': 2,
Receiver: 2,
Emitter: 4,
'Low emitter': 9,
Idle: 0,
Transceiver: 5,
Tophub: 0,
Hub: 1,
Dam: 6,
Reducer: 12,
Megamplifier: 7,
Amplifier: 10
},
{
edges: 345,
Blackhole: 1,
Vulcano: 3,
Channeler: 8,
Chain: 9,
Bridge: 0,
Connector: 2,
'Emitter branch': 1,
'Receiver branch': 2,
Receiver: 2,
Emitter: 4,
'Low emitter': 9,
Idle: 1,
Transceiver: 0,
Tophub: 0,
Hub: 1,
Dam: 6,
Reducer: 10,
Megamplifier: 7,
Amplifier: 11
},
{...}
];
// Measure the similarity
const similarities = watchcomplexity.network.similarity(subject, networks);
Field | Type | Description |
---|---|---|
[*] |
[Object] | An array containing the similarity results (ordered in the same way of the original networks input parameter). |
[*].score |
float | The numerical similarity score calculated as percentage in range 0.0-1.0. |
[*].value |
enum(String) | The qualitative value of similarity. It can be one of the following values: strongly similar , very similar , similar , a little similar , very low similar , different , totally different . |
[
{value: "strongly similar", score: 1},
{value: "very similar", score: 0.9999067685996643},
{value: "totally different", score: 0},
{value: "very low similar", score: 0.4961592033161797},
{...},
...
]