-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
347 lines (332 loc) · 14 KB
/
script.js
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
const layers = document.querySelectorAll('.layer');
const questionsContainer = document.getElementById('questionsBox');
const methodologyList = document.getElementById('methodologyList');
const questions = {
1: [
"Which regulation should be specified for this AI workflow?",
"Which country has specified this regulation?",
"Can you list out the key requirements set up by the regulation?",
"Can you categorize the guidelines into ethical and technical ones?",
"Who are the stakeholders involved in this AI workflow?"
],
2: [
"What are the specific requirements within the domain?",
"Does the domain encompass high-stakes areas such as healthcare or finance?",
"What are the potential risks associated with the domain?",
"Are there any pre-existing assumptions that are necessary?",
"Is feedback from domain experts a requirement for this process?"
],
3: [
"What type of information is contained within the data?",
"What inferences can be drawn from this data?",
"Which aspects of the data are the most significant?",
"How is the information distributed within the data?",
"Is it feasible to enhance the model’s performance by reducing the number of dimensions?",
"Could the use of data summarization techniques provide a more effective explanation?"
],
4: [
"What attributes render a parameter, objective, or action important to the system?",
"At what point did the system assess a parameter, objective, or action, and when was it disregarded by the model?",
"What are the repercussions of altering a decision or modifying a parameter?",
"How was a specific action executed by the system?",
"How are these model parameters, objectives, or actions interconnected?",
"What elements does the system consider (or exclude) when making a decision?",
"What methods does the system employ or avoid to accomplish a goal or inference?"
],
5: [
"What are the expected outcomes from the Predictions layer?",
"How does the model's performance affect predictions?",
"What metrics are used to evaluate the accuracy of predictions?",
"What external factors can influence the predictions?",
"How often are the predictions updated based on new data?"
]
};
const methodologies = {
1: [
{
question: "Which regulation should be specified for this AI workflow?",
methods: [
"Consult legal experts to identify applicable regulations.",
"Utilize regulatory compliance software for tracking.",
"Implement a legal risk assessment framework."
]
},
{
question: "Which country has specified this regulation?",
methods: [
"Research regulatory databases for country-specific regulations.",
"Engage with international regulatory bodies for insights.",
"Conduct comparative legal studies."
]
},
{
question: "Can you list out the key requirements set up by the regulation?",
methods: [
"Use regulatory checklists to ensure compliance.",
"Engage stakeholders in defining key compliance requirements.",
"Implement a requirements management tool."
]
},
{
question: "Can you categorize the guidelines into ethical and technical ones?",
methods: [
"Develop a framework to categorize compliance requirements.",
"Utilize expert panels to assess ethical implications.",
"Apply qualitative analysis techniques."
]
},
{
question: "Who are the stakeholders involved in this AI workflow?",
methods: [
"Map stakeholders using stakeholder analysis tools.",
"Conduct interviews with identified stakeholders.",
"Utilize participatory design methods."
]
}
],
2: [
{
question: "What are the specific requirements within the domain?",
methods: [
"Conduct domain-specific research to gather requirements.",
"Engage domain experts in workshops.",
"Utilize requirement elicitation techniques."
]
},
{
question: "Does the domain encompass high-stakes areas such as healthcare or finance?",
methods: [
"Perform a risk assessment analysis.",
"Conduct case studies in high-stakes domains.",
"Engage with industry experts."
]
},
{
question: "What are the potential risks associated with the domain?",
methods: [
"Implement risk management frameworks.",
"Utilize SWOT analysis to identify risks.",
"Conduct failure mode and effects analysis (FMEA)."
]
},
{
question: "Are there any pre-existing assumptions that are necessary?",
methods: [
"Document assumptions as part of the project charter.",
"Utilize critical assumptions analysis techniques.",
"Conduct expert interviews."
]
},
{
question: "Is feedback from domain experts a requirement for this process?",
methods: [
"Establish a feedback loop with domain experts.",
"Conduct focus groups for iterative feedback.",
"Utilize online surveys to gather expert feedback."
]
}
],
3: [
{
question: "What type of information is contained within the data?",
methods: [
"Conduct data profiling to understand data types.",
"Use exploratory data analysis (EDA) techniques.",
"Implement data lineage tools."
]
},
{
question: "What inferences can be drawn from this data?",
methods: [
"Utilize statistical analysis to derive insights.",
"Implement machine learning algorithms for prediction.",
"Conduct data visualization to identify patterns."
]
},
{
question: "Which aspects of the data are the most significant?",
methods: [
"Use feature importance analysis in machine learning.",
"Implement correlation analysis to identify relationships.",
"Conduct hypothesis testing."
]
},
{
question: "How is the information distributed within the data?",
methods: [
"Use data distribution analysis tools.",
"Implement data visualization techniques.",
"Conduct exploratory data analysis (EDA)."
]
},
{
question: "Is it feasible to enhance the model’s performance by reducing the number of dimensions?",
methods: [
"Apply dimensionality reduction techniques such as PCA.",
"Utilize feature selection methods.",
"Conduct model performance comparisons with and without dimensionality reduction."
]
},
{
question: "Could the use of data summarization techniques provide a more effective explanation?",
methods: [
"Implement data summarization algorithms.",
"Utilize data visualization techniques for summarization.",
"Conduct user studies to assess effectiveness."
]
}
],
4: [
{
question: "What attributes render a parameter, objective, or action important to the system?",
methods: [
"Utilize attribute importance metrics.",
"Conduct sensitivity analysis to assess impact.",
"Implement decision trees for visualization."
]
},
{
question: "At what point did the system assess a parameter, objective, or action, and when was it disregarded by the model?",
methods: [
"Conduct model auditing to trace decision-making.",
"Implement logging for model parameters.",
"Utilize explainability techniques."
]
},
{
question: "What are the repercussions of altering a decision or modifying a parameter?",
methods: [
"Conduct impact analysis for parameter changes.",
"Utilize simulation models to predict outcomes.",
"Implement scenario analysis."
]
},
{
question: "How was a specific action executed by the system?",
methods: [
"Document action execution workflows.",
"Utilize system logs for tracing actions.",
"Implement process mapping."
]
},
{
question: "How are these model parameters, objectives, or actions interconnected?",
methods: [
"Create parameter relationship diagrams.",
"Utilize system dynamics modeling.",
"Conduct correlation analysis."
]
},
{
question: "What elements does the system consider (or exclude) when making a decision?",
methods: [
"Implement decision trees to visualize decision-making.",
"Conduct a decision analysis framework.",
"Utilize explainable AI methods."
]
},
{
question: "What methods does the system employ or avoid to accomplish a goal or inference?",
methods: [
"Document methods as part of the design process.",
"Conduct method selection analysis.",
"Utilize comparative studies of methodologies."
]
}
],
5: [
{
question: "What are the expected outcomes from the Predictions layer?",
methods: [
"Define outcome metrics at the beginning of the project.",
"Conduct validation studies to verify outcomes.",
"Utilize outcome measurement frameworks."
]
},
{
question: "How does the model's performance affect predictions?",
methods: [
"Implement performance evaluation metrics.",
"Conduct comparative studies on model performance.",
"Utilize visualization techniques for performance insights."
]
},
{
question: "What metrics are used to evaluate the accuracy of predictions?",
methods: [
"Utilize common metrics like accuracy, precision, and recall.",
"Implement confusion matrix analysis.",
"Conduct ROC curve analysis."
]
},
{
question: "What external factors can influence the predictions?",
methods: [
"Conduct a risk analysis for external factors.",
"Implement sensitivity analysis for variables.",
"Utilize scenario modeling."
]
},
{
question: "How often are the predictions updated based on new data?",
methods: [
"Establish a data update schedule.",
"Implement continuous learning systems.",
"Utilize real-time data processing tools."
]
}
]
};
// Initially display the first layer
layers[0].style.display = 'block';
document.querySelectorAll('.layer-button').forEach(button => {
button.addEventListener('click', (event) => {
const layer = event.target.closest('.layer');
// Get the layer number
const layerNum = layer.getAttribute('data-layer');
// Clear previous questions
questionsContainer.innerHTML = '';
// Display corresponding questions as checkboxes
questions[layerNum].forEach(question => {
const checkbox = document.createElement('input');
checkbox.type = 'checkbox';
checkbox.id = question;
checkbox.value = question;
checkbox.classList.add('question-checkbox');
const label = document.createElement('label');
label.htmlFor = question;
label.textContent = question;
questionsContainer.appendChild(checkbox);
questionsContainer.appendChild(label);
questionsContainer.appendChild(document.createElement('br'));
});
// Show current layer and its parent
let currentLayer = layer;
while (currentLayer) {
currentLayer.style.display = 'block'; // Show the current layer
currentLayer = currentLayer.parentElement.closest('.layer'); // Move to the parent layer
}
// Show next layer only if it exists
const nextLayer = layer.querySelector('.layer');
if (nextLayer) {
nextLayer.style.display = 'block'; // Show the next layer
}
});
});
// Add event listener for checkboxes
questionsContainer.addEventListener('change', () => {
// Clear previous methodologies
methodologyList.innerHTML = '';
const selectedCheckboxes = questionsContainer.querySelectorAll('.question-checkbox:checked');
selectedCheckboxes.forEach(checkbox => {
const questionText = checkbox.value;
// Find the methodologies corresponding to the selected question
Object.entries(methodologies).forEach(([layerNum, methodList]) => {
methodList.forEach(method => {
if (method.question === questionText) {
methodologyList.innerHTML += `<li><strong>${questionText}</strong>:<ul>${method.methods.map(m => `<li>${m}</li>`).join('')}</ul></li>`;
}
});
});
});
});