ZahirJS commited on
Commit
077a09e
·
verified ·
1 Parent(s): bf5eed8

Create sample_data.py

Browse files
Files changed (1) hide show
  1. sample_data.py +249 -0
sample_data.py ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ COMPLEX_SAMPLE_JSON = """
2
+ {
3
+ "central_node": "Artificial Intelligence (AI)",
4
+ "nodes": [
5
+ {
6
+ "id": "ml",
7
+ "label": "Machine Learning (ML)",
8
+ "relationship": "Core Domain",
9
+ "subnodes": [
10
+ {
11
+ "id": "sl",
12
+ "label": "Supervised Learning",
13
+ "relationship": "Learning Paradigm",
14
+ "subnodes": [
15
+ {
16
+ "id": "sl_prob",
17
+ "label": "Probabilistic Models",
18
+ "relationship": "Approach Type",
19
+ "subnodes": [
20
+ {
21
+ "id": "nbc",
22
+ "label": "Naive Bayes Classifier",
23
+ "relationship": "Algorithm Example",
24
+ "subnodes": [
25
+ {"id": "text_class", "label": "Text Classification", "relationship": "Application"},
26
+ {"id": "spam_det", "label": "Spam Detection", "relationship": "Application"}
27
+ ]
28
+ },
29
+ {
30
+ "id": "lda",
31
+ "label": "Linear Discriminant Analysis",
32
+ "relationship": "Algorithm Example",
33
+ "subnodes": [
34
+ {"id": "dim_red_lda", "label": "Dimensionality Reduction", "relationship": "Use Case"},
35
+ {"id": "face_recog", "label": "Face Recognition", "relationship": "Use Case"}
36
+ ]
37
+ }
38
+ ]
39
+ },
40
+ {
41
+ "id": "sl_det",
42
+ "label": "Deterministic Models",
43
+ "relationship": "Approach Type",
44
+ "subnodes": [
45
+ {
46
+ "id": "svm",
47
+ "label": "Support Vector Machines (SVM)",
48
+ "relationship": "Algorithm Example",
49
+ "subnodes": [
50
+ {"id": "image_recog", "label": "Image Recognition", "relationship": "Application"},
51
+ {"id": "bioinfo", "label": "Bioinformatics", "relationship": "Application"}
52
+ ]
53
+ },
54
+ {
55
+ "id": "dt",
56
+ "label": "Decision Trees",
57
+ "relationship": "Algorithm Example",
58
+ "subnodes": [
59
+ {"id": "credit_scoring", "label": "Credit Scoring", "relationship": "Application"},
60
+ {"id": "medical_diag", "label": "Medical Diagnosis", "relationship": "Application"}
61
+ ]
62
+ }
63
+ ]
64
+ }
65
+ ]
66
+ },
67
+ {
68
+ "id": "ul",
69
+ "label": "Unsupervised Learning",
70
+ "relationship": "Learning Paradigm",
71
+ "subnodes": [
72
+ {
73
+ "id": "clus",
74
+ "label": "Clustering",
75
+ "relationship": "Task Type",
76
+ "subnodes": [
77
+ {
78
+ "id": "kmeans",
79
+ "label": "K-Means Clustering",
80
+ "relationship": "Algorithm Example",
81
+ "subnodes": [
82
+ {"id": "customer_seg", "label": "Customer Segmentation", "relationship": "Application"},
83
+ {"id": "document_analysis", "label": "Document Analysis", "relationship": "Application"}
84
+ ]
85
+ },
86
+ {
87
+ "id": "dbscan",
88
+ "label": "DBSCAN",
89
+ "relationship": "Algorithm Example",
90
+ "subnodes": [
91
+ {"id": "anomaly_det", "label": "Anomaly Detection", "relationship": "Application"},
92
+ {"id": "spatial_data", "label": "Spatial Data Analysis", "relationship": "Application"}
93
+ ]
94
+ }
95
+ ]
96
+ },
97
+ {
98
+ "id": "dim_red_ul",
99
+ "label": "Dimensionality Reduction",
100
+ "relationship": "Task Type",
101
+ "subnodes": [
102
+ {
103
+ "id": "pca",
104
+ "label": "Principal Component Analysis (PCA)",
105
+ "relationship": "Algorithm Example",
106
+ "subnodes": [
107
+ {"id": "feature_ext", "label": "Feature Extraction", "relationship": "Use Case"},
108
+ {"id": "noise_red", "label": "Noise Reduction", "relationship": "Use Case"}
109
+ ]
110
+ },
111
+ {
112
+ "id": "tsne",
113
+ "label": "t-SNE",
114
+ "relationship": "Algorithm Example",
115
+ "subnodes": [
116
+ {"id": "data_viz", "label": "Data Visualization", "relationship": "Application"},
117
+ {"id": "genomics", "label": "Genomics", "relationship": "Application"}
118
+ ]
119
+ }
120
+ ]
121
+ }
122
+ ]
123
+ }
124
+ ]
125
+ },
126
+ {
127
+ "id": "dl",
128
+ "label": "Deep Learning (DL)",
129
+ "relationship": "Subfield of ML",
130
+ "subnodes": [
131
+ {
132
+ "id": "cnn",
133
+ "label": "Convolutional Neural Networks (CNNs)",
134
+ "relationship": "Architecture Type",
135
+ "subnodes": [
136
+ {
137
+ "id": "img_class",
138
+ "label": "Image Classification",
139
+ "relationship": "Primary Use",
140
+ "subnodes": [
141
+ {
142
+ "id": "alexnet",
143
+ "label": "AlexNet",
144
+ "relationship": "Historic Model",
145
+ "subnodes": [
146
+ {"id": "imagenet", "label": "ImageNet Challenge", "relationship": "Milestone"},
147
+ {"id": "gpu_accel", "label": "GPU Acceleration", "relationship": "Enabling Factor"}
148
+ ]
149
+ },
150
+ {
151
+ "id": "resnet",
152
+ "label": "ResNet",
153
+ "relationship": "Advanced Model",
154
+ "subnodes": [
155
+ {"id": "residual_con", "label": "Residual Connections", "relationship": "Key Feature"},
156
+ {"id": "deeper_nets", "label": "Deeper Networks", "relationship": "Benefit"}
157
+ ]
158
+ }
159
+ ]
160
+ },
161
+ {
162
+ "id": "obj_det_cnn",
163
+ "label": "Object Detection",
164
+ "relationship": "Primary Use",
165
+ "subnodes": [
166
+ {
167
+ "id": "yolo",
168
+ "label": "YOLO (You Only Look Once)",
169
+ "relationship": "Real-time Algorithm",
170
+ "subnodes": [
171
+ {"id": "speed", "label": "High Speed", "relationship": "Advantage"},
172
+ {"id": "single_pass", "label": "Single Pass Detection", "relationship": "Mechanism"}
173
+ ]
174
+ },
175
+ {
176
+ "id": "faster_rcnn",
177
+ "label": "Faster R-CNN",
178
+ "relationship": "Region-based Algorithm",
179
+ "subnodes": [
180
+ {"id": "region_props", "label": "Region Proposals", "relationship": "Mechanism"},
181
+ {"id": "accuracy", "label": "High Accuracy", "relationship": "Advantage"}
182
+ ]
183
+ }
184
+ ]
185
+ }
186
+ ]
187
+ },
188
+ {
189
+ "id": "rnn",
190
+ "label": "Recurrent Neural Networks (RNNs)",
191
+ "relationship": "Architecture Type",
192
+ "subnodes": [
193
+ {
194
+ "id": "seq_data",
195
+ "label": "Sequential Data Processing",
196
+ "relationship": "Primary Use",
197
+ "subnodes": [
198
+ {
199
+ "id": "nlp_rnn",
200
+ "label": "Natural Language Processing (NLP)",
201
+ "relationship": "Application Area",
202
+ "subnodes": [
203
+ {"id": "text_gen_rnn", "label": "Text Generation", "relationship": "Specific Task"},
204
+ {"id": "sentiment_rnn", "label": "Sentiment Analysis", "relationship": "Specific Task"}
205
+ ]
206
+ },
207
+ {
208
+ "id": "speech_rec",
209
+ "label": "Speech Recognition",
210
+ "relationship": "Application Area",
211
+ "subnodes": [
212
+ {"id": "voice_assist", "label": "Voice Assistants", "relationship": "Product Example"},
213
+ {"id": "transcription", "label": "Audio Transcription", "relationship": "Task"}
214
+ ]
215
+ }
216
+ ]
217
+ },
218
+ {
219
+ "id": "advanced_rnn",
220
+ "label": "Advanced RNN Variants",
221
+ "relationship": "Improvements",
222
+ "subnodes": [
223
+ {
224
+ "id": "lstm",
225
+ "label": "Long Short-Term Memory (LSTM)",
226
+ "relationship": "Variant Type",
227
+ "subnodes": [
228
+ {"id": "vanishing_grad", "label": "Solves Vanishing Gradients", "relationship": "Benefit"},
229
+ {"id": "memory_cells", "label": "Internal Memory Cells", "relationship": "Mechanism"}
230
+ ]
231
+ },
232
+ {
233
+ "id": "gru",
234
+ "label": "Gated Recurrent Unit (GRU)",
235
+ "relationship": "Variant Type",
236
+ "subnodes": [
237
+ {"id": "simpler_than_lstm", "label": "Simpler Architecture", "relationship": "Characteristic"},
238
+ {"id": "comparable_perf", "label": "Comparable Performance", "relationship": "Characteristic"}
239
+ ]
240
+ }
241
+ ]
242
+ }
243
+ ]
244
+ }
245
+ ]
246
+ }
247
+ ]
248
+ }
249
+ """