-
Notifications
You must be signed in to change notification settings - Fork 18
/
CSO-Classifier.py
62 lines (36 loc) · 1.89 KB
/
CSO-Classifier.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 14 14:43:42 2019
@author: angelosalatino
"""
# In[Loading Libraries]:
from cso_classifier import CSOClassifier
import json
# In[Loading Paper]:
paper = {
"title": "De-anonymizing Social Networks",
"abstract": "Operators of online social networks are increasingly sharing potentially "
"sensitive information about users and their relationships with advertisers, application "
"developers, and data-mining researchers. Privacy is typically protected by anonymization, "
"i.e., removing names, addresses, etc. We present a framework for analyzing privacy and "
"anonymity in social networks and develop a new re-identification algorithm targeting "
"anonymized social-network graphs. To demonstrate its effectiveness on real-world networks, "
"we show that a third of the users who can be verified to have accounts on both Twitter, a "
"popular microblogging service, and Flickr, an online photo-sharing site, can be re-identified "
"in the anonymous Twitter graph with only a 12% error rate. Our de-anonymization algorithm is "
"based purely on the network topology, does not require creation of a large number of dummy "
"\"sybil\" nodes, is robust to noise and all existing defenses, and works even when the overlap "
"between the target network and the adversary's auxiliary information is small.",
"keywords": "data mining, data privacy, graph theory, social networking (online)"
}
print(paper["title"])
print(paper["abstract"])
print(paper["keywords"])
# In[Run Classifier]
cc = CSOClassifier(explanation=True, get_weights=True, filter_by=["computer security"])
result = cc.run(paper)
# In[Printing and Saving]:
print(result)
with open('output.json', 'w') as outfile:
json.dump(result, outfile, indent=4)