Title: | Resisting Neighbor Label Attack in a Dynamic Network |
---|---|
Description: | An anonymization algorithm to resist neighbor label attack in a dynamic network. |
Authors: | Jiaqi Tang |
Maintainer: | Jiaqi Tang <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2025-03-01 05:37:23 UTC |
Source: | https://github.com/s1107967177/dynetnlaresistance |
Anonymize a snapshot of a dynamic network.
anonymization(g, alpha = 1, beta = 2, gamma = 3)
anonymization(g, alpha = 1, beta = 2, gamma = 3)
g |
A network grouped by lw-grouping algorithm. |
alpha |
Weight of anonymization cost resulted from label generalization. |
beta |
Weight of anonymization cost resulted from adding edges. |
gamma |
Weight of anonymization cost resulted from adding nodes. |
Anonymize two node.
anonymize2node(g, uid, vid, noise = g$noise)
anonymize2node(g, uid, vid, noise = g$noise)
g |
A graph contains vertexs with different labels and some of which are sensitive. |
uid |
Name of a node with sensitive label. |
vid |
Name of a node with unsensitive label. |
noise |
Current amount of noise nodes. |
A list with information of anonymized network.
Calculate anonymization cost of two nodes.
cost(g, uid, vid, alpha = 1, beta = 2, gamma = 3)
cost(g, uid, vid, alpha = 1, beta = 2, gamma = 3)
g |
A graph contains vertexs with different labels and some of which are sensitive. |
uid |
Name of a node with sensitive label. |
vid |
Name of a node with unsensitive label. |
alpha |
Weight of anonymization cost resulted from label generalization. |
beta |
Weight of anonymization cost resulted from adding edges. |
gamma |
Weight of anonymization cost resulted from adding nodes. |
Anonymization cost of two nodes.
Draw a graph contains vertexs with sensitive or unsensitive label
draw.graph(g, main = NULL, label = NA)
draw.graph(g, main = NULL, label = NA)
g |
A graph contains vertexs with different labels and some of which are sensitive. |
main |
The title of graph. |
label |
Label of vertexs. |
dynet <- make.virtual.dynamic.network() draw.graph(dynet$t1)
dynet <- make.virtual.dynamic.network() draw.graph(dynet$t1)
Generate a grouped dynamic network by lw-grouping algorithm.
lw.grouping(dynet = NULL, l = 2, w = 3)
lw.grouping(dynet = NULL, l = 2, w = 3)
dynet |
An ungrouped dynamic network. |
l |
Kinds of labels in each unmerged group. |
w |
Width of window of lw-grouping algorithm. |
A list of grouped network with attribute of gs.merged.
Make a vertex-increasing virtual dynamic network.
make.virtual.dynamic.network(network.data = NULL, len = 10, by = 5, label.types = 100, prop.init = 0.001, prop.sensitive = 0.1)
make.virtual.dynamic.network(network.data = NULL, len = 10, by = 5, label.types = 100, prop.init = 0.001, prop.sensitive = 0.1)
network.data |
A data frame containing a symbolic edge list,which contains the information of whole network data. |
len |
Time of this dynamic network lasts. |
by |
The number of vertex added in network each time. |
label.types |
The number of label types the network possesses. |
prop.init |
The proportion of vertex amounts of initial network in whole network data. |
prop.sensitive |
The proportion of amounts of vertex with sensitive label in whole network data. |
A list of snapshots of a virtual dynamic network.
dynet <- make.virtual.dynamic.network()
dynet <- make.virtual.dynamic.network()
Collaboration network of Arxiv Condensed Matter category (there is an edge if authors coauthored at least one paper) network
network
network
An object of class data.frame
with 93439 rows and 2 columns.
@format A data frame with 93439 rows and 2 variables: